Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLEXEC won't Insert data
Message
From
06/01/2008 08:47:09
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
06/01/2008 08:41:18
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01279605
Message ID:
01279729
Views:
15
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform