There is an insert code in the database:
procedure TQueryThread.Execute; begin FMyConn := TMyConnection.Create(nil); FMyConn.Server := IniParams.pServer; FMyConn.Port := StrToInt(IniParams.pPort); FMyConn.Database := IniParams.pDatabase; FMyConn.Username := 'address'; FMyConn.Password := 'xxx'; FMyConn.Connected := true; qFileBlob := TMyQuery.Create(nil); qFileBlob.Connection := FMyConn; qFileBlob.SQL.Clear; qFileBlob.SQL.Add('INSERT INTO attachment (address_id,file_blob,create_date,file_name,file_extension,description) values (:pAddressID,:pFileBlob,:pCreateDate,:pFileName,:pFileExtension,:pDescription)'); qFileBlob.ParamByName('pAddressID').AsInteger := FAddressID; qFileBlob.ParamByName('pFileBlob').LoadFromFile(FName, ftBlob); qFileBlob.ParamByName('pCreateDate').AsDate := FCreateDate; qFileBlob.ParamByName('pFileName').AsString := ExtractFileName(FName); qFileBlob.ParamByName('pFileExtension').AsString := ExtractFileExt(FName); qFileBlob.ParamByName('pDescription').AsString := FDescription; qFileBlob.Execute; Synchronize(DisplayMessage); end; The bottom line is that when you try to insert more than 16MB files into the database outside the local network, we get the error:
This error is absent when inserting Blob fields within the local network, regardless of the size of the inserted file.
At the time of the error we have:
SHOW VARIABLES LIKE 'max_allowed_packet' mysql> show variables like "max_allowed_pa -> ; +--------------------+-----------+ | Variable_name | Value | +--------------------+-----------+ | max_allowed_packet | 524288000 | +--------------------+-----------+ What could be the problem?
