473,402 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Bulk insert - error: Unexpected end-of-file (EOF) encountered in data file.

AB
Hi to all,
I have a problem about a importation of a file *.csv with SQL Server,
through a bulk insert, called in a store procedure that a c# sw calls.
This is the description of the error:
-----
System.Data.SqlClient.SqlException è stata individuata
Message="Bulk Insert: Unexpected end-of-file (EOF) encountered in
data file.\r\nOLE DB provider 'STREAM' reported an error. The provider
did not give any information about the error.\r\nOLE DB error trace
[OLE/DB Provider 'STREAM' IRowset::GetNextRows returned 0x80004005:
The provider did not give any information about the error.].\r\nThe
statement has been terminated."
Source=".Net SqlClient Data Provider"
ErrorCode=-2146232060
Class=16
LineNumber=1
Number=4832
Procedure=""
Server="ets3971"
State=1
StackTrace:
at System.Data.SqlClient.SqlConnection.OnError(SqlExc eption
exception, Boolean breakConnection)
at
System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException
exception, Boolean breakConnection)
at
System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject
stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
SqlCommand cmdHandler, SqlDataReader dataStream,
BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject
stateObj)
at
System.Data.SqlClient.SqlCommand.FinishExecuteRead er(SqlDataReader ds,
RunBehavior runBehavior, String resetOptionsString)
at
System.Data.SqlClient.SqlCommand.RunExecuteReaderT ds(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean
async)
at
System.Data.SqlClient.SqlCommand.RunExecuteReader( CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String
method, DbAsyncResult result)
at
System.Data.SqlClient.SqlCommand.InternalExecuteNo nQuery(DbAsyncResult
result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at sarbox.Default.LoadFlux_Click(Object sender, EventArgs e) in
c:\Inetpub\wwwroot\Zarbox2.2\SoxAdmin\Default.aspx .cs:line 1509
---

Th@nks to all
AB@

Apr 17 '07 #1
2 4905
Sounds to me like there is something wrong near the end of the .CSV file. It
could be something as simple as a missing double quote mark.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"AB@" wrote:
Hi to all,
I have a problem about a importation of a file *.csv with SQL Server,
through a bulk insert, called in a store procedure that a c# sw calls.
This is the description of the error:
-----
System.Data.SqlClient.SqlException è stata individuata
Message="Bulk Insert: Unexpected end-of-file (EOF) encountered in
data file.\r\nOLE DB provider 'STREAM' reported an error. The provider
did not give any information about the error.\r\nOLE DB error trace
[OLE/DB Provider 'STREAM' IRowset::GetNextRows returned 0x80004005:
The provider did not give any information about the error.].\r\nThe
statement has been terminated."
Source=".Net SqlClient Data Provider"
ErrorCode=-2146232060
Class=16
LineNumber=1
Number=4832
Procedure=""
Server="ets3971"
State=1
StackTrace:
at System.Data.SqlClient.SqlConnection.OnError(SqlExc eption
exception, Boolean breakConnection)
at
System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException
exception, Boolean breakConnection)
at
System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject
stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
SqlCommand cmdHandler, SqlDataReader dataStream,
BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject
stateObj)
at
System.Data.SqlClient.SqlCommand.FinishExecuteRead er(SqlDataReader ds,
RunBehavior runBehavior, String resetOptionsString)
at
System.Data.SqlClient.SqlCommand.RunExecuteReaderT ds(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean
async)
at
System.Data.SqlClient.SqlCommand.RunExecuteReader( CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String
method, DbAsyncResult result)
at
System.Data.SqlClient.SqlCommand.InternalExecuteNo nQuery(DbAsyncResult
result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at sarbox.Default.LoadFlux_Click(Object sender, EventArgs e) in
c:\Inetpub\wwwroot\Zarbox2.2\SoxAdmin\Default.aspx .cs:line 1509
---

Th@nks to all
AB@

Apr 17 '07 #2
AB
On 17 Apr, 15:56, Peter Bromberg [C# MVP]
<pbromb...@yahoo.yabbadabbadoo.comwrote:
Sounds to me like there is something wrong near the end of the .CSV file.It
could be something as simple as a missing double quote mark.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net

"AB@" wrote:
Hi to all,
I have a problem about a importation of a file *.csv with SQL Server,
through a bulk insert, called in a store procedure that a c# sw calls.
This is the description of the error:
-----
System.Data.SqlClient.SqlException è stata individuata
Message="Bulk Insert: Unexpected end-of-file (EOF) encountered in
data file.\r\nOLE DB provider 'STREAM' reported an error. The provider
did not give any information about the error.\r\nOLE DB error trace
[OLE/DB Provider 'STREAM' IRowset::GetNextRows returned 0x80004005:
The provider did not give any information about the error.].\r\nThe
statement has been terminated."
Source=".Net SqlClient Data Provider"
ErrorCode=-2146232060
Class=16
LineNumber=1
Number=4832
Procedure=""
Server="ets3971"
State=1
StackTrace:
at System.Data.SqlClient.SqlConnection.OnError(SqlExc eption
exception, Boolean breakConnection)
at
System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException
exception, Boolean breakConnection)
at
System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObje*ct
stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
SqlCommand cmdHandler, SqlDataReader dataStream,
BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject
stateObj)
at
System.Data.SqlClient.SqlCommand.FinishExecuteRead er(SqlDataReader ds,
RunBehavior runBehavior, String resetOptionsString)
at
System.Data.SqlClient.SqlCommand.RunExecuteReaderT ds(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean
async)
at
System.Data.SqlClient.SqlCommand.RunExecuteReader( CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String
method, DbAsyncResult result)
at
System.Data.SqlClient.SqlCommand.InternalExecuteNo nQuery(DbAsyncResult
result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at sarbox.Default.LoadFlux_Click(Object sender, EventArgs e) in
c:\Inetpub\wwwroot\Zarbox2.2\SoxAdmin\Default.aspx .cs:line 1509
---
Th@nks to all
AB@- Nascondi testo tra virgolette -

- Mostra testo tra virgolette -
It's not this, I control. Do you have some other idea?

Th@nks
AB@

Apr 17 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: MLH | last post by:
I call the following Sub and Function in frmLaunch's OnOpen event code. I keep getting Property Not Found error for the AllowBypassKey setting. Failure point is line #30 in the Function (not the...
10
by: MLH | last post by:
Anybody know why I might be getting error #2109 during the procedure below? It does not occur on 2 desktops, but did on a laptop. The error said: "The following unexpected error occurred in Sub...
6
by: MLH | last post by:
"The following unexpected error occurred in Sub CopyMySQLbttn_Click, line #250, CBF on frmVehicleChooserform. 2465: "Can't find the field 'forms' referred to in your expression. You may have...
6
by: SandySears | last post by:
I am trying to use a stored procedure to insert a record using VS 2005, VB and SQL Server Express. The code runs without errors or exceptions, and returns the new identifer in the output...
2
by: P | last post by:
Hi all, I'm trying to run the following code taken from http://blogs.ittoolbox.com/database/technology/archives/006045.asp# select substr(tablespace_name,1,30) as "Tablespace Name", case...
3
by: Dave | last post by:
I'm writing a c# Windows program that needs to be able to insert records into a dbase table. I can read it using a dataset but can't insert records. I receive the following error, ERROR ...
3
by: bb nicole | last post by:
Below is the code i create when i click on the job title hyperlink, it will display the job information where call from database. But the error message is: Parse error: parse error, unexpected $end...
8
by: Santy | last post by:
Hello All, I am new to DB2, Currently i am using DB2 version 8.02 personal edition on Windows XP Professional. And Facing problem with rowlock in insert query. I have created a sample database...
2
by: nano | last post by:
Does sql server have a way to handle errors in a sproc which would allow one to insert rows, ignoring rows which would create a duplicate key violation? I know if one loops one can handle the error...
2
by: chompy | last post by:
I am trying to dynamically create the errorfile name with the date the error occured. The error occurs at ERRORFILE = @errorfilename Is this possible? Here is the script I have so far... ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.