----------------- >Hi, > >I have already posted this query 4-5 days ago but no >reply yet so posting 2nd time. > >Here is the query. > >Application Used: Visual Basic 6 >Database: MySQL 4.0.2 >ODBC: MyODBC 3.51.03 > >I have create a table which has BLOB field in which i >want to save a bitmap file. > >To save record i create a ADO recordset for that table >and after that update that field with binary data of >image file, but problem is that though field is of >BLOB datatype ADO recordset say its size is only 64K >so if i try to save file larger than 64K it truncates >remaining data. > >Following is the table structure and vbcode i use >---------------------------------------------------- >MySQL Tables --> >create table attachment >( >attachmentid int auto_increment not null primary key, >attachmentname varchar(200), >attachment longblob >)type=innodb;
Above you describe that you use BLOB datatype. But in your create table statement you use LONGBLOB. If you really use LONGBLOB you can store L+4 bytes, where L < 2^32. If this not works this may a problem of VB6. I am using MS Visual C++ 6.0 and it works with LONGBLOB. The LONGBLOB column is map to the MS Visual C++ datatype CLongBinary. Check what VB datatype is mapping to BLOB/LONGBLOB and try to change it. Regards Bernd --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php