>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.