Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

APPEND goes into infinite loop VFP8

Status
Not open for further replies.

s36e175

Programmer
Jun 22, 2003
16
0
0
NZ
I'm new to VFP. I have a DBASEIV app which I have just tried to run under VFP8. The program contains a code sequence as follows. When it hits APPEND, VFP seems to go into an infinite loop of appending records to the table. I was expecting it to APPEND a single record and open an edit screen. I have inserted the WAIT in there to prove that it wasn't looping somewhere in my code - it seems to be within the APPEND itself. Any thoughts?
USE CUSTOMER.DBF
SET ORDER TO CARDNO
SET FORMAT TO CUST_FM
APPEND
WAIT
Thanks, Jim
 
Jim,
Was this table put into a database (.DBC)? Did you recreate the indexes? Have you tried it without the SET FORMAT statement - this is really not even documented in VFP (at least not since 3.0). What version and service pack level of VFP are you using?

Rick
 
Jim,

Although the program appears to be hanging on the Append, the problem could well be within the format file. I suggest you paste the commands from the format file into your main code (just before the Append), and run it from there.

You could also try running that code in the debugger. Open your program in the Trace window, then repeatedly click the Step Into button (the one that looks like a pair of braces with an arrow pointing into it). That will let you single-step through the code. The little yellow arrow always points to the next line of code to be executed. With luck, that will tell you exactly which line caused the problem.

If that doensn't help, report back.

Mike


Mike Lewis
Edinburgh, Scotland
 
It was in the format file.
I have decided to rebuild the app in VFP8 rather than try to keep putting lipstick on a DBASEIV bulldog.
Regards, Jim


 
s36e175


I have decided to rebuild the app in VFP8 rather than try to keep putting lipstick on a DBASEIV bulldog.

A wise decision. ;-)


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Jim,

I have decided to rebuild the app in VFP8 rather than try to keep putting lipstick on a DBASEIV bulldog.


I think that's the best thing you can do. You should still be able to salvage a lot of your dBASE IV code, but you should at the very least re-design the user interface for VFP. Do away with your format files, and with all @/SAY and @/GET commands, and use forms instead.

Mike

Mike Lewis
Edinburgh, Scotland
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top