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

Discussion in 'ASP .Net' started by AB@, Apr 17, 2007.

  1. AB@

    AB@ Guest

    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(SqlException
    exception, Boolean breakConnection)
    at
    System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
    exception, Boolean breakConnection)
    at
    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
    stateObj)
    at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
    SqlCommand cmdHandler, SqlDataReader dataStream,
    BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject
    stateObj)
    at
    System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds,
    RunBehavior runBehavior, String resetOptionsString)
    at
    System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(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.InternalExecuteNonQuery(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@
     
    AB@, Apr 17, 2007
    #1
    1. Advertising

  2. RE: Bulk insert - error: Unexpected end-of-file (EOF) encountered in d

    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(SqlException
    > exception, Boolean breakConnection)
    > at
    > System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
    > exception, Boolean breakConnection)
    > at
    > System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
    > stateObj)
    > at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
    > SqlCommand cmdHandler, SqlDataReader dataStream,
    > BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject
    > stateObj)
    > at
    > System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds,
    > RunBehavior runBehavior, String resetOptionsString)
    > at
    > System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(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.InternalExecuteNonQuery(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@
    >
    >
     
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=, Apr 17, 2007
    #2
    1. Advertising

  3. AB@

    AB@ Guest

    Re: Bulk insert - error: Unexpected end-of-file (EOF) encountered in d

    On 17 Apr, 15:56, Peter Bromberg [C# MVP]
    <> wrote:
    > 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(SqlException
    > > exception, Boolean breakConnection)
    > > at
    > > System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
    > > exception, Boolean breakConnection)
    > > at
    > > System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObje­ct
    > > stateObj)
    > > at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
    > > SqlCommand cmdHandler, SqlDataReader dataStream,
    > > BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject
    > > stateObj)
    > > at
    > > System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds,
    > > RunBehavior runBehavior, String resetOptionsString)
    > > at
    > > System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(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.InternalExecuteNonQuery(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@
     
    AB@, Apr 17, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sean
    Replies:
    6
    Views:
    406
  2. Niraj
    Replies:
    2
    Views:
    10,758
    Jim Kennedy
    Mar 3, 2004
  3. ABC
    Replies:
    1
    Views:
    743
    Galin iliev
    May 11, 2006
  4. Jim Coyne
    Replies:
    0
    Views:
    463
    Jim Coyne
    Nov 28, 2006
  5. Abraham Vionas
    Replies:
    2
    Views:
    253
    Abraham Vionas
    Nov 23, 2004
Loading...

Share This Page