UniDAC 3.0.0.6 Posting longblob error

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ManzTiara
Posts: 2
Joined: Mon 15 Feb 2010 01:33

UniDAC 3.0.0.6 Posting longblob error

Post by ManzTiara » Mon 22 Feb 2010 08:13

Dear All,

We face the problem with longblob field, that cannot be saved/update by unidac with error message "Data Type not supported".

here the snap of code:
QBiodata := TUniQuery.Create(Self);
QBiodata.Connection := MainForm.DBConn1;
QBiodata.SQL.Clear;
QBiodata.SQL.Text := 'Update m_biodata set foto = :p_foto where EID = ' + quotedStr(cxTextEdit1.Text);
if cxImage1.Picture.Graphic nil then
QBiodata.ParamByName('p_foto').Assign(cxImage1.Picture.Graphic)
else QBiodata.ParamByName('p_foto').Value := NULL;
QBiodata.Execute;

The error pointed at:
QBiodata.ParamByName('p_foto').Assign(cxImage1.Picture.Graphic)
with message: "Data Type not supported"

How to resolve this problem.

Thank you

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Tue 23 Feb 2010 14:51

To solve the problem you should use the TDAParam.LoadFromStream or TDAParam.SetBlobData methods.

Post Reply