I/o Error While Reading Bcp Format File
Contents |
New? Advanced Search Forum Database Discussions MS SQL Server 7/MS SQL Server 2000 [mssql] I/O error while reading BCP format file If this is your first visit, be sure to check out the FAQ by i/o error while writing bcp data-file clicking the link above. You may have to register before you can post: click the
Unexpected Eof Encountered In Bcp Data-file
register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 2 of 2 Thread: [mssql] I/O error while reading BCP format file Tweet Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 02-29-2000,01:37 AM #1 Daniel Bolger Guest [mssql] I/O error while reading BCP format file Hi All, I had a problem today where BCP would not read the format file I created giving the following error: I/O error while reading BCP format file. I searched the archives here at swynk.com and found a thread titled exactly the same as the one I am now creating. There were numerous responses to this thread but none of them seemed to solve the problem for me (short of the one that suggested using BCP to create the format file, which I didn't want to do). I used BCP to create a format file for me (which looked identical to the format file that I created) and it worked fine. With my suspicions aroused, I used a binary file viewer to look at the contents of each file and highlight the differences. Apart from the usual variations in whitespace I noticed that the my file did not have any carriage returnline feed at the end of the last row definition. My format file ended at the end of the last row definition line. It did not have any carriage returns and line feeds. I matched the one generated by BCP and added the following " " to the end of the file, tested my format file and it worked perfectly. The moral of the story is, make sure when you create a format file, you have an empty line at the end of the file (ie: after your last "Server Column Name", make sure you have " " sans quotes). Hope this saves someone a few hours :-) Cheers, Dan. Reply With Quote 11-26-2007,01:42 PM #2 hi_madan View Profile View Forum Posts Registered User Join Date Nov 2007 Posts 1 du
(Русский)ישראל (עברית)المملكة العربية السعودية (العربية)ไทย (ไทย)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語) HomeLibraryLearnDownloadsTroubleshootingCommunityForums Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Asked by: [Microsoft][SQL Native Client]I/O error while reading BCP format file SQL Server > Transact-SQL Question 0 Sign in to vote Hi Guys I am trying to bcp a data file into a table, but when i try to run the http://forums.databasejournal.com/showthread.php?18211-mssql-I-O-error-while-reading-BCP-format-file bcp command its giving me Error while reading BCP format file, Can some one hlp me with this please.... here is my format file 9.071 SQLCHAR 0 2 "" 0 ETXRA_FIELD ""2 SQLCHAR 0 6 "" 1 RECLAIM_REF_NO SQL_Latin1_General_CP1_CI_AS3 SQLCHAR 0 3 "" 2 COUNTRY_CODE ""4 SQLCHAR 0 6 "" 3 BENEFICIAL_OWNER_CODE ""5 SQLCHAR 0 12 "" 4 RECLAIM_FORM_REF_NO SQL_Latin1_General_CP1_CI_AS6 SQLCHAR 0 3 "" 5 CURRENCY_CODE SQL_Latin1_General_CP1_CI_AS7 SQLCHAR 0 1 "\r\n" 6 FORM_PURSUE_IND SQL_Latin1_General_CP1_CI_AS Data file 12RCRFNO123123456RECFORMREFNOCCDA here is the bcp command bcp database.dbo.table IN C:\rama\data_file.txt -f C:\rama\format_file.fmt -S servername https://social.msdn.microsoft.com/Forums/sqlserver/en-US/690ab7d7-3f1e-41da-a1b1-d2900adecd3f/microsoftsql-native-clientio-error-while-reading-bcp-format-file?forum=transactsql -U username -P password Thanks in advance. Wednesday, October 08, 2008 7:19 PM Reply | Quote All replies 0 Sign in to vote Here is alink that can help you with BCP in http://www.nigelrivett.net/SQLTsql/BCP_quoted_CSV_Format_file.html Also can you try putting file in some other place except in C drive's root. I mean just make another folder in C drive and put the file in there many times due to security external process cannot directly read from C drive. Wednesday, October 08, 2008 8:23 PM Reply | Quote Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.Would you like to participate? Privacy statement © 2
IO error while reading BCP format file Discussion in 'SQL Server DTS-Related Questions' started by cutiepie, Sep 21, 2005. cutiepie New Member hi, i m having http://www.sql-server-performance.com/forum/threads/io-error-while-reading-bcp-format-file.19072/ problems with the bcp file format... 9.0 2 1 SQLCHAR 0 4 "," 1 in_numbers SQL_Latin1_General_CP1_CI_AS 2 SQLCHAR 0 5 " " 2 values SQL_Latin1_General_CP1_CI_AS and the input file is 1234,other 5678,column but http://binaryworld.net/main/CodeDetail.aspx?CodeId=3935 now its givin me the error as IO error while reading BCP format file.... it was workin for sometime..it copied these two rows as well...but again its givin me this error again n i/o error again...i cant understand...wat m i suppose to do now...PLEASEEEEE TRY TO HELPPPP thnks in advance cutiepie, Sep 21, 2005 #2 satya Moderator Is this topic related to your current problem threadhttp://www.sql-server-performance.com/forum/topic.asp?TOPIC_ID=10436 ? Ensure the path and columns are properly specified for that bcp file. Satya SKJ Moderator http://www.SQL-Server-Performance.Com/forum This posting is provided “AS IS†with no rights for the sake of knowledge sharing. satya, Sep 21, i/o error while 2005 #2 dineshasanka Moderator check this http://sqlteam.com/forums/topic.asp?TOPIC_ID=43246 ---------------------------------------- Cast your vote http://www.geocities.com/dineshasanka/sqlserver05.html http://spaces.msn.com/members/dineshasanka dineshasanka, Sep 21, 2005 #2 cutiepie New Member Hi,thanks for your suggestions.... i found the mistake...it was just after the last row i had to press ENTER twice or thrice so that there will be some more empty rows in the format file... thats all...n the problem is solved now.. thnks once again cutiepie, Sep 21, 2005 #2 (You must log in or sign up to reply here.) Share This Page Tweet Please click 'Forgot Your Password' to reset your password if this is your first time using the new forums. Your name or email address: Do you already have an account? Forgot your password? No, create an account now. Yes, my password is: Stay logged in SQL Server Performance Forums Home Forums > ARCHIVED SQL Server Posts > SQL Server 7.0 and 2000 Forum Topics > SQL Server DTS-Related Questions > Forums Forums Quick Links Search Forums What's New? Members Members Quick Links Registered Members Current Visitors Recent Activity Help Help Quick Links Smilies BB Codes Trophies Search titles only Posted by Member: Separate names with a comma. Newer Than: Advanced search...