I am transfering data of a table from LINUX to Windows XP using bcp.
The table is exported to file in LINUX using the following command:
bcp Mydb..Cust out Cust.dat -c -r \| -t \~ -S LinuxPC -U sa
The file is then imported to the table in the Windows XP. But after trying for several options, it does not work. The import command is:
bcp MyDB..Cust in Cust.dat -c -t \~ -S WinPC -U sa
The error message is:
CSLIB Message: - L0/O0/S0/N24/1/0:
cs_convert: cslib user api layer: common library error: The conversion/operation
was stopped due to a syntax error in the source field.
Unexpected EOF encountered in BCP data-file.
I have used the -e errlog.log option. But the log file is empty.
And the program produced a runtime core dump also...
Originally posted by perl
Use -e BCP option while doing 'bcp in' and check the error log file, where exactly this problem occurs , on which paticular row and check if there is any special ch. or unrcognised ch. in file
1. Make sure both tables have same number of columns and data types.
2. Try different column delimiter. You might have ~ in you data somewhere.
3. Use -b option and try to bcp in 5 or 10 rows to make sure you can atleast move some rows in OR is it the first row causing the error. If so, then you should consider option no. 1 again.