Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

BCP error on identitiy column

5 posts in Windows NT Last posting was on 2001-03-30 12:25:52.0Z
First m last Posted on 2000-02-22 22:13:41.0Z
From: "First m last" <first.m.last@jsc.nasa.gov>
Subject: BCP error on identitiy column
Date: Tue, 22 Feb 2000 16:13:41 -0600
Lines: 24
Organization: JSC
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Message-ID: <Kyc43LYf$GA.251@forums.sybase.com>
Newsgroups: sybase.public.sqlserver.nt
NNTP-Posting-Host: 139.169.85.173
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:2519
Article PK: 1089974

Hi everyone,
I have a table, my_log, that has an identity column.

I got an error message when I tried to bcp the data in from another server.
The message was:
"Row 10, Column 1: 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.
@#"

The command I used to bcp data out from my_server:
"BCP my_log out c:\data\my_log.txt -T -c -r\n -Usa -Password -Smy_server"

The command I used to bcp data in to my_server2:
"BCP my_log in
c:\data\my_log.txt -E -T -c -r\n -Usa -Password -Smy_server2"

Can someone tell me how to fix the problem? I tried to find out the
definition of the flags, i.e., -E,...and was not successful.
Thank you in advance.
Jenny


Paymon_Yau Posted on 2001-03-30 12:25:52.0Z
From: Paymon_Yau
Date: Fri, 30 Mar 2001 08:25:52 -0400
Newsgroups: sybase.public.sqlserver.nt
Subject: Re: BCP error on identitiy column
Message-ID: <699176E2CE7F75140044497785256A1F.0048F7A58525688E@webforums>
References: <Kyc43LYf$GA.251@forums.sybase.com>
Lines: 2
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.sqlserver.nt:1007
Article PK: 1087614

Try using the -n switch instead of -c


Joseph Campbell Posted on 2000-02-23 14:26:21.0Z
Message-ID: <38B3EE0C.36A8F5E1@voicenet.com>
Date: Wed, 23 Feb 2000 09:26:21 -0500
From: Joseph Campbell <moandjo@voicenet.com>
Organization: XtendTech Inc.
X-Mailer: Mozilla 4.7 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: BCP error on identitiy column
References: <Kyc43LYf$GA.251@forums.sybase.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.sqlserver.nt
Lines: 27
NNTP-Posting-Host: 209.71.19.101
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:2513
Article PK: 1089967

There is a command you need to do before inserting values into an indentity
col....

I think it is SET IDENTITY INSERT and you should be able to find it in Sybooks.

HTH,
Joe Campbell

First m last wrote:

> Hi everyone,
> I have a table, my_log, that has an identity column.
>
> I got an error message when I tried to bcp the data in from another server.
> The message was:
> "Row 10, Column 1: 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.
> @#"
>
> The command I used to bcp data out from my_server:
> "BCP my_log out c:\data\my_log.txt -T -c -r\n -Usa -Password -Smy_server"
>
> The command I used to bcp data in to my_server2:
> "BCP my_log in
> c:\data\my_log.txt -E -T -c -r\n -Usa -Password -Smy_server2"
>
> Can someone tell me how to fix the problem? I tried to find out the
> definition of the flags, i.e., -E,...and was not successful.
> Thank you in advance.
> Jenny


Rob Verschoor Posted on 2000-02-23 15:25:59.0Z
From: "Rob Verschoor" <rob@sypron.nl>
References: <Kyc43LYf$GA.251@forums.sybase.com> <38B3EE0C.36A8F5E1@voicenet.com>
Subject: Re: BCP error on identitiy column
Date: Wed, 23 Feb 2000 16:25:59 +0100
Lines: 47
Organization: Sypron B.V.
X-Newsreader: Microsoft Outlook Express 4.71.1712.3
X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3
Message-ID: <xKp#RLhf$GA.151@forums.sybase.com>
Newsgroups: sybase.public.sqlserver.nt
NNTP-Posting-Host: p859.asi.euronet.nl 194.134.125.59
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:2512
Article PK: 1089964

"set identity insert" is an SQL command. The BCP equivalent is the
"-E" option.

Rob V.

Joseph Campbell wrote in message <38B3EE0C.36A8F5E1@voicenet.com>...
>There is a command you need to do before inserting values into an
indentity
>col....
>
>I think it is SET IDENTITY INSERT and you should be able to find it
in Sybooks.
>
>HTH,
> Joe Campbell
>
>First m last wrote:
>
>> Hi everyone,
>> I have a table, my_log, that has an identity column.
>>
>> I got an error message when I tried to bcp the data in from another
server.
>> The message was:
>> "Row 10, Column 1: 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.
>> @#"
>>
>> The command I used to bcp data out from my_server:
>> "BCP my_log out
c:\data\my_log.txt -T -c -r\n -Usa -Password -Smy_server"
>>
>> The command I used to bcp data in to my_server2:
>> "BCP my_log in
>> c:\data\my_log.txt -E -T -c -r\n -Usa -Password -Smy_server2"
>>
>> Can someone tell me how to fix the problem? I tried to find out
the
>> definition of the flags, i.e., -E,...and was not successful.
>> Thank you in advance.
>> Jenny
>


samdeva Posted on 2000-09-25 20:06:51.0Z
From: samdeva@hotmail.com
Date: Mon, 25 Sep 2000 16:06:51 -0400
Newsgroups: sybase.public.sqlserver.nt
Subject: Re: BCP error on identitiy column
Message-ID: <4216347A5FA7452D006E7DD885256965.0056C1478525688E@webforums>
References: <Kyc43LYf$GA.251@forums.sybase.com> <38B3EE0C.36A8F5E1@voicenet.com> <xKp#RLhf$GA.151@forums.sybase.com>
Lines: 10
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.sqlserver.nt:1608
Article PK: 1089084

Does any of you actually read the problem that this person is having? She
already used -E option. It seems the problem is with row 10 only. Try
using "-t field_terminator" option while bcping out and in. Here is an
example.

BCP OUT:
"BCP my_log out c:\data\my_log.txt -T -c -t'|' -r\n -Usa -Password
-Smy_server"

BCP IN:
"BCP my_log in
c:\data\my_log.txt -E -T -c -t'|' -r\n -Usa -Password -Smy_server2"