Menu

#5 SQLException: Received invalid column length from bcp client

open
nobody
5
2008-07-22
2008-07-22
Paul Cullum
No

I'm testing an export to table in MS SQL that includes some bigint columns and nothing is getting exported. The following error appears when I enable debug logging with a PrintWriter.

java.sql.SQLException: Received invalid column length from bcp client.
at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:3128)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2566)
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:730)
at net.sourceforge.jtds.jdbc.TdsCore.bcpBatch(TdsCore.java:2373)
at net.sourceforge.jtds.jdbc.BCP.bcpBatch(BCP.java:1122)
at net.sourceforge.jtds.jdbc.BCP.run(BCP.java:799)
at com.nable.export.BCPTest.main(BCPTest.java:52)

Discussion

  • Paul Cullum

    Paul Cullum - 2008-07-22

    Debug log of bcp.

     
  • Paul Cullum

    Paul Cullum - 2008-07-22

    Logged In: YES
    user_id=1386985
    Originator: YES

    This test loads the data from a file. There is only one record in the file. The bigint columns don't appear to be the problem. First I changed them to float and had the same problem. I changed a field value so that it was no longer null and the problem went away. It was a VARCHAR.

     

Log in to post a comment.

MongoDB Logo MongoDB