Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need advice with long vfp commands over 254 characters
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Need advice with long vfp commands over 254 characters
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP3
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
00981108
Message ID:
00981108
Views:
61
hello,

for the first time i am using VFP to insert and update data in a SQL 2000 server. i typically have very long lines that look like this

=sqlprepare(...insert into table (field1, field2, field3, .....) values (...)
=sqlexec(...)

my problem is that the first statement is often more than 254 characters, (its often 500 or 700 characters) so i get a VFP error. what i end up doing is breaking up the insert into an insert and one or more updates. it is a major pain in the arse and a waste of time. i do something like this

=sqlprepare(...insert into table
=sqlexec(...)

=sqlprepare(...select max(id) from table...)
=sqlexec(...)

=sqlprepare(...update table set .... where id=maxid
=sqlexec(...)

i know i must be doing something wrong and am overlooking a simple solution.

thanks,

nancy
Next
Reply
Map
View

Click here to load this message in the networking platform