Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLEXEC won't Insert data
Message
De
06/01/2008 08:47:09
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
06/01/2008 08:41:18
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:
01279729
Vues:
14
>Hi Cetin,
>
>I'm getting an error when I try to insert more than 10 fields using SQLExec.
>
>lnsuccess = SQLEXEC(gnConnHandle, "INSERT INTO Sync_Box (;
> Ordernum, box, status, shiplist, charges, ship_date, inpart, hold_date, custnum, trackingno, box_id, ship_to, ship_via, ship_when) ;
> VALUES (;
> ?Order, ?box, ?status, ?shiplist, ?charges, ?ship_date, ?inpart, ?hold_date, ;
> ?custnum, ?trackingno, ?box_id, ?ship_to, ?ship_via, ?ship_when)")
>
>If I take out any 4 fields it works great. What am I doing wrong?
>Many thanks.

Rixon,
It's not because of field count but due to literal string limit of 255 I guess (I didn't check the lenght).
Use Text...endtext to build your SQL (is that SQL server? if so you don't need pretext):
text to m.lcSQL noshow pretext 15
INSERT INTO Sync_Box (
  Ordernum, box, status, shiplist, charges, 
  ship_date, inpart, hold_date, custnum, 
   trackingno, box_id, ship_to, ship_via, ship_when) 
 VALUES (?m.Order, ?m.box, ?m.status, ?m.shiplist, ?m.charges, 
  ?m.ship_date, ?m.inpart, ?m.hold_date, ?m.custnum, 
  ?m.trackingno, ?m.box_id, ?m.ship_to, ?m.ship_via, ?m.ship_when)
endtext
lnsuccess = SQLEXEC(m.gnConnHandle, m.lcSQL)
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