Question : BCP Error while loading data from text file.

Hi All,
 We are using bcp to load data from text files into Sybase.

 The error I'm getting is:
 
 CSLIB Message :  - LO/00/SO/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.

 This is the first time I'm working with SYBASE.

 To ensure I'm doing things correctly, I've created a simple test table with two columns and created a simple text file with data and tried with bcp. I'm able load this data. Next I've tried with another test table with 4 columns, all are of VarChar data type and loaded data with another text file that we have created. Even we have skipped values for some of the columns and tested. This has worked.

When we are trying to load with the actual datafiles it's giving the above said error. Please help.

The command we used to load with bcp is :

 bcp ..e> in/out -e -c -t -r -U -P -S

  bcp gass..AccountsData in C:\datafile.txt -e c:\errors.txt -c -t "~" -r "\n" -U sa -P -S

 We have about 30 data files to be uploaded into different tables and I've tried with different tables with tables which has columns with datetime data type and without datetime datatype also.

 Except the test data and the dummy records actual data is not getting loaded.

 Can you please guide us.

Regards,
RamanaRao
 

 
 
 

Answer : BCP Error while loading data from text file.

PAQed - no points refunded (of 500)

modulo
Community Support Moderator
Random Solutions  
 
programming4us programming4us