General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Need advice with long vfp commands over 254 characters
Environment versions
Network:
Windows 2003 Server
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only