Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why VFP9 SP2 stops working?
Message
 
 
To
30/09/2017 04:22:23
Al Doman (Online)
M3 Enterprises Inc.
North Vancouver, British Columbia, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01654670
Message ID:
01654684
Views:
65
>>Hi,
>>
>>I am converting from a few DBFs to SQL Database. I have a DO WHILE loop and a couple of DO WHILE within it.
>>
>>I have to run this routine several times, for different values. Sometimes, only after about 3 minutes, I get the message that VFP stopped working.. and the only thing I can do is stop/close program.
>>
>>Is it something in my code or how can I make VFP run until the end?
>>
>>TIA
>>
>>UPDATE. It appears that it happens after about 1000 records are added to a table in SQL Server. And I can see in VFP IDE that at certain point the record pointer in a DBF moves slowly. Must be something to do with memory. How can I "clear" the memory on every loop in DO WHILE?
>>
>>UPDATE 2. I set a "test" point that writes to a text file every PK value assigned by SQL server to a table. And it seems to always stop on PK 1001. Could it be that SQL Server Express 2014 has a limit of 1000 records in a table?
>
>Some suggestions:
>
>- Monitor total RAM usage in Task Manager - both overall, and for VFP in particular. If you find VFP usage climbing you can use SYS( 3050 ) to limit it to 500MB or less
>
>- If it's not a production database, check the database's Recovery Model. If it's Full, you could try setting it to Simple. I had one project where I was updating several SQL databases that were in Full recovery mode, and the operations I was doing caused the log files to balloon - ISTR running out of disk space (in a limited-space VM) in one case. Switching to Simple recovery mode addressed that. You could check overall disk space and keep an eye on your log file sizes. If you do switch from Full to Simple mode, bear in mind that reduces your recovery options in case of crashes or other issues, and consider switching back to Full model when you're done
>
>- There's an interesting quirk to SQL Server 2012 and later, that in some cases if you're using Identity columns their values can jump by 1,000 unexpectedly. This is discussed at https://stackoverflow.com/questions/14146148/identity-increment-is-jumping-in-sql-server-database . Interestingly, the top of the first answer has a link to an MSKB article which was up on September 5 when I last looked at it, but has since been taken down by Microsoft. Naoto is right AFAIK, IME there's no row limit in SQL Server Express. On the face of it this issue doesn't seem the same as what you're seeing but the fact it's stopping at 1,000 may not be a coincidence
>
>- You don't say whether you're using T-SQL directly, remote views, or SQL passthrough, but if it's either of the latter you may need to adjust VFP parameters such as FetchSize.

Thank you, all, very much for your input. It appears that the stackoverflow thread points to my problem. I will review it more carefully later.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform