dbTalk Databases Forums  

BCP I/O Error

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss BCP I/O Error in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Govardhan MV
 
Posts: n/a

Default BCP I/O Error - 04-18-2005 , 06:59 AM






Hi,

When i run the following command i get the following error ,

c:\bcp TSQL.dbo.abc in c:\val.dat -fc:\val.fmt -SServer -Usa -Psa
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]I/O error while reading BCP
format file
--------------------
Table Name :abc
--------------------
a char(10)
b char(10)
c char(10)
--------------------
Format File val.fmt
--------------------
8.0
3
1 SQLCHAR 0 10 "\t" 1 a
2 SQLCHAR 0 10 "\t" 2 b
3 SQLCHAR 0 10 "\r\n" 3 c
--------------------
Data File val.dat
--------------------
abc ABC test

I run this from the client side.. Can i know what is problem..

Regards
Govardhan MV


Reply With Quote
  #2  
Old   
Paolo Fiore
 
Posts: n/a

Default Re: BCP I/O Error - 04-18-2005 , 07:18 AM






"Govardhan MV" <GovardhanMV (AT) discussions (DOT) microsoft.com> wrote

Quote:
8.0
3
1 SQLCHAR 0 10 "\t" 1 a
2 SQLCHAR 0 10 "\t" 2 b
3 SQLCHAR 0 10 "\r\n" 3 c
--------------------
Data File val.dat
--------------------
abc ABC test

sorry, should be a formatting issue with my newsreader, but... I do not
see a 30-bytes-lenght record.
You defined a fixed column input file and IMO it should be something like
"abc ABC test "

I had some problems with record terminator too; check all records end with
CR+LF (x'0A'+x'0D') (or the contrary I dont remember)




Reply With Quote
  #3  
Old   
Govardhan MV
 
Posts: n/a

Default Re: BCP I/O Error - 04-18-2005 , 07:58 AM



Hi Paolo Fiore,

I tried out what you have specified but still i getting the same error.

Regards
Govardhan MV


"Paolo Fiore" wrote:

Quote:
"Govardhan MV" <GovardhanMV (AT) discussions (DOT) microsoft.com> wrote in message
news:E6C024B8-0E50-493A-878C-FE8A42012865 (AT) microsoft (DOT) com...
8.0
3
1 SQLCHAR 0 10 "\t" 1 a
2 SQLCHAR 0 10 "\t" 2 b
3 SQLCHAR 0 10 "\r\n" 3 c
--------------------
Data File val.dat
--------------------
abc ABC test


sorry, should be a formatting issue with my newsreader, but... I do not
see a 30-bytes-lenght record.
You defined a fixed column input file and IMO it should be something like
"abc ABC test "

I had some problems with record terminator too; check all records end with
CR+LF (x'0A'+x'0D') (or the contrary I dont remember)




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.