Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need advice with long vfp commands over 254 characters
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Need advice with long vfp commands over 254 characters
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP3
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
00981108
Message ID:
00981108
Vues:
60
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform