Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ODBC Error during SQL INSERT command
Message
 
To
03/08/2007 15:17:19
Raza Malik
Universal Accounting Software
Edgewater, New Jersey, United States
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 7 SP1
Miscellaneous
Thread ID:
01245884
Message ID:
01245901
Views:
24
Hi,

> But when inserting a large # of records (500+) I get an ODBC error. It usually happens at during the INSERT command. The error will start only after inserting 500+ records.

Without the exact error message I can only make a few generic suggestions.

First of all, make sure that you don't use a single transaction for all these records. You can use SQLCOMMIT() to tell the server to write these records. Otherwise you are taking quite a few resources.

VFP has a few problems with parameterized queries in huge quantities. If memory consumption or the number of temporary files keeps increasing while you insert new records, you should split the process into a new EXE. This EXE inserts something like 250 records then exits. The main program uses RUN or ShellExecute to run the new EXE.

I found large memo fields to cause problems, as well, especially with Oracle.
--
Christof
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform