Page 1 of 1

BLOB Fields over 1MB

Posted: Tue 09 May 2006 18:42
by GHill
I am using Delphi7 and MyDAC 4.30.0.12 14.04.06 to store sound files in a LONGBLOB field. The code is below:
--------------------------------------------------------------------------
q := 'insert into tblsound (dtbegintime,dtendtime,szsector,sFacid,blobsound) ';
q := q + 'VALUES ';
q := q + '(:pdtbegintime,:pdtendtime,:pszsector,:psFacid,:pblobsound) ';
newsoundcommand.SQL.Text := q;
newsoundcommand.ParamByName('psFacid').Asstring := lfacEdit.text;
newsoundcommand.ParamByName('pszsector').Asstring := sectorcombobox1.text;
newsoundcommand.ParamByName('pdtbegintime').Asdatetime := G_StartTime;
newsoundcommand.ParamByName('pdtendtime').Asdatetime := G_EndTime;
newsoundcommand.ParamByName('pblobsound').DataType := ftBlob;
newsoundcommand.ParamByName('pblobsound').LoadFromfile(Mypath + '7Minutes.wma', ftBlob);
newsoundcommand.Execute;

--------------------------------------------------------------------
The 7Minutes.wma file is just over a 1Meg.

This code will Immediatly generate a error EMYSQLException ..."Lost Connection to Mysql server during query".... Socket Error on Write...WASGetLastError Return 10054....

I can use the same code with the file 6Minutes.wma (about 900K) and it works fine.

This code runs after the MySQLConnection is made.

I have set the MAX_ALLOWED_PACKET to 1GB in the MySQL Server and it still does not help


I sure could use some help on this

Thanks

Posted: Tue 09 May 2006 21:32
by GEswin
I don't know if MAX_ALLOWED_PACKET 1GB is a valid value, but i'm sure with MAX_ALLOWED_PACKET = 16MB will work.

Re: BLOB Fields over 1MB

Posted: Fri 12 May 2006 06:38
by Bernhard Geyer
GHill wrote:I have set the MAX_ALLOWED_PACKET to 1GB in the MySQL Server and it still does not help
Have you checked this parameter if MySQL uses this value (SHOW VARIABLES)?