Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLEXEC won't Insert data
Message
De
06/01/2008 09:06:52
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
06/01/2008 08:59:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01279605
Message ID:
01279738
Vues:
24
This message has been marked as the solution to the initial question of the thread.
>Sorry, it should be the following, but it still fails.
>
>use SyncBoxQuery
>SCAN NEXT 20
>text to m.lcSQL noshow
> INSERT INTO Sync_Box (;
> shiplist, charges, ship_date, inpart, hold_date, custnum, box_id, ship_to, ship_via, ship_when) ;
> VALUES (;
> ?shiplist, ?charges, ?ship_date, ?inpart, ?hold_date, ?custnum, ?box_id, ?ship_to, ?ship_via, ?ship_when)
>ENDTEXT
>lnsuccess = SQLEXEC(m.gnConnHandle, m.lcSQL)

BTW move the text...endtext outside scan (and precompile the query with SQLPrepare):
text to m.lcSQL noshow
	INSERT INTO Sync_Box (
		shiplist, charges, ship_date, inpart, hold_date, custnum, box_id, ship_to, ship_via, ship_when) 
	 VALUES (
		?SyncBoxQuery.shiplist, ?SyncBoxQuery.charges, ...)
ENDTEXT

use SyncBoxQuery
SQLPREPARE(m.gnConnHandle, m.lcSQL)
SCAN NEXT 20
  lnsuccess = SQLEXEC(m.gnConnHandle) && till query changes it is m.lcSQL
endscan
PS: Remove semicolons. To SQL server ; denotes end of statement. Use a single ; at end or none.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform