Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLEXEC won't Insert data
Message
De
06/01/2008 09:03:02
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
06/01/2008 08:57:45
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:
01279735
Vues:
13
>Hmmm... This fails each time. It is SQL Server 2005 from Foxpro 9.
>
>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)

Scan? Then there is a cursor/table in question. Alias the parameters:
...
VALUES (;
 ?myCursor.shiplist, ?myCursor.charges, ...
With SQL 2005 you don't need pretext and code like:
insert into myTable
 (myField1, myField2)
 --Comment about what is being inserted
 values
 --Another inline comment
 (?myCursor.v1,?myCursor.v2)
PS: Tip: From SQL management studio query window you can copy the code that works and paste in text...endtext section (adjust parameters if needed).
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