locked
Problem inserting data into longblob field RRS feed

  • Question

  • User-973319413 posted

    Hi All,

    I am using MySQL as my database.I am saving documents (Word,Pdf,excel and image files) in MySQL.I have created a Longblob column in MySQL for this purpose.

    I am first reading the document in bytestream and inserting the bytestream into the Longblob field.I am successfully able to insert the document of sizes approx 60MB into the column.But if the document size exceeds 150MB , i get the following error

    ERROR [HY000] [MySQL][ODBC 3.51 Driver][mysqld-5.0.18-nt]General driver defined error

    I am not able to understand what this error is about.Can someone tell me what this error is about and how i can rectify this.

    Thanks and Regards

    Ashvin RaviShankar.V

    Wednesday, November 30, 2011 11:50 PM

Answers

  • User-973319413 posted

    Hi People,

    I found the solution.

    The issue lies in ODBCConnector.I switched to MySQL connector and it works fine.I downloaded the MySQL connector from here

    http://dev.mysql.com/downloads/connector/net/1.0.html

    and included the MySql.Data.dll into my project.Now i am able to store documents of sizes upto 500MB.

    Thanks all

    Ashvin

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, December 1, 2011 6:15 AM

All replies

  • User1508394307 posted

    Ashvin,

    Check the MySQL configuration value "max_allowed_packet" and make sure its large enough.

    For more information see http://dev.mysql.com/doc/refman/5.1/en/packet-too-large.html

    Thursday, December 1, 2011 3:32 AM
  • User-973319413 posted

    -

    Smirnov,

    I had increased the packet size to 3000MB and but still i get the same error.

    Ashvin

    Thursday, December 1, 2011 3:58 AM
  • User-973319413 posted

    Hi People,

    I found the solution.

    The issue lies in ODBCConnector.I switched to MySQL connector and it works fine.I downloaded the MySQL connector from here

    http://dev.mysql.com/downloads/connector/net/1.0.html

    and included the MySql.Data.dll into my project.Now i am able to store documents of sizes upto 500MB.

    Thanks all

    Ashvin

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, December 1, 2011 6:15 AM
  • User1508394307 posted

    Great, thanks for sharing this tip.

    Thursday, December 1, 2011 6:51 AM