Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using the Bulk Copy
Message
From
14/01/1999 08:16:21
Bob Tracy
Independent Consultant
Driftwood, Texas, United States
 
 
To
13/01/1999 15:47:54
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00175669
Message ID:
00175836
Views:
28
>We are using SQL 7 and I am using the BCP to take data out of MS SQL and tring to put new records into SQL. If I try to use BCP from a foxpro table "COPY TO c:\try.txt TYPE DELI" with the BCP command "BCP.EXE database..table in c:\try.txt -c -t , -Sipaddress -Uuser -Ppass" it gives me an error "String data, right truncation" but if I do it with the wizards it imports allright. Has anyone ran into this or is it something with the BCP?

Hi Chuck,

I haven't had this particular problem with BCP (I've certainly had others!) but I moved data from VFP to SQL Server on a daily basis using it. I've had my best results by copying the VFP file SDF and then BCP'ing into SQL using a format file. The syntax is in the Transact-SQl Reference and there is another thread on UT today concerning format files. You can edit the format files in VFP if they don't work the first time.

The error message sounds like a field width problem on the SQL side or you failed to specify a terminator when setting up the transfer format. Good luck!
Bob Tracy

Never engage in a battle of wits if you're only half armed.
Previous
Reply
Map
View

Click here to load this message in the networking platform