Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Pasthrough
Message
 
 
À
04/02/2002 12:16:13
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00614891
Message ID:
00614901
Vues:
24
Hi!

Did you tried syntax with "?" parameters?

testthissd = "INSERT INTO drawmstrp (dm_drawing_number,dm_drawing_title,dm_pending_change,dm_date_issued,dm_requester_name1,dm_requester_name2, ;
dm_job_order,dm_project,dm_customer) Values(?nfn,?nf2,?nf3,?nf4,?nf5,?nf6,?nf7,?nf8,?nf9)"
*? testthissd

"nfn" and like variables used above are just plain values, not a string constants for a macro. You can pass this way really large string, for example. You can use also a field after "?", field's value will be correctly passes into the INSERT statement.

This works for SQL Server 7.0, just test if this works in your case.

HTH.

>I am using SPT to insert data into as AS400 database. All works fine until I try and add another field of the record to insert. What I think is happening is my insert string is getting too long. How can I use variables to make the string shorter?
>
>My Code:
>testthissd = "INSERT INTO drawmstrp (dm_drawing_number,dm_drawing_title,dm_pending_change,dm_date_issued,dm_requester_name1,dm_requester_name2, ;
>dm_job_order,dm_project,dm_customer) Values(&nfn,&nf2,&nf3,&nf4,&nf5,&nf6,&nf7,&nf8,&nf9)"
>*? testthissd
>
>= SQLSETPROP(gnHandle1n, 'Transactions', 2)
>= SQLEXEC(gnHandle1n, testthissd)
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform