如題:
sqlite資料庫中,我想用insert into 陳述句插入blob欄位的記錄資料。請高手救命,例如:
例如:insert into table1(id,fieldBlob) values(1,?)
接下來不會寫了,好像需要用到sqlite3_bind_blob,等等的函式。請大家幫助我
uj5u.com熱心網友回復:
if (trim(edit1.Text)<>'') and (not image1.Picture.Graphic.empty) thenbegin
with adoquery1 do
begin
sql.Clear;
sql.Add('insert into pic values(:a,:b)');
adoquery1.Parameters[0].Value:=edit1.Text;
adoquery1.Parameters[1].Assign(image1.Picture.graphic);
//adoquery1.Parameters[1].LoadFromStream(tmpstream);兩種方式都可以,mssql肯定沒問題
ExecSQL;
sql.Clear;
sql.Add('select * from pic');
open
end;
end;
uj5u.com熱心網友回復:
adoquery1.Parameters[1].DataType = ftBlob;
adoquery1.Parameters[1].LoadFromStream(Stream, ftBlob);
uj5u.com熱心網友回復:
僅供參考with ADOQueryTemp do
begin
Close;
SQL.Clear;
SQL.Add('update T_Consumption_Detail_Temp');
SQL.Add('set Associated_ID =''1'' ');
SQL.Add('where bill_id =:Bill_id ');
parameters.parambyname('bill_id').Value :='XXX';
ExecSQL;
end;
ADOQueryTemp.close;
ADOQueryTemp.open;
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/22587.html
標籤:數據庫相關
上一篇:delphi中的Tchart控制元件怎么把初始曲線去掉?
下一篇:MySQL8資料庫登錄
