用sql语句怎么实现图象存取?请高手指教?
在paradox中肖像设为Graphic类型。
with query1 do
begin
close;
sql.Clear;
s:='update student set 肖像=:pic where 姓名="a"';
sql.add(s);
try
parambyname('pic').LoadFromFile('a.bmp',ftGraphic);
execsql;
except
showmessage('error');
end;
end;
执行时说我capability not support!
问题点数:20、回复次数:4Top
1 楼zfmich()回复于 2001-12-11 14:23:32 得分 0
你用TBLOBFIELD类型变量试试。Top
2 楼blackfiles(一个和尚挑水喝)回复于 2001-12-11 15:00:57 得分 0
Query1.Paramters.ParamByName('pic').Assign(image1.Picture.Bitmap);Top
3 楼taxi(当时明月在,曾照彩云归)回复于 2001-12-11 15:01:41 得分 20
with query1 do
begin
close;
sql.Clear;
s := 'update student set 肖像=:pic where 姓名=''a''';
sql.add(s);
try
parambyname('pic').LoadFromFile('a.bmp',ftGraphic);
execsql;
except
showmessage('error');
end;
end;
Top
4 楼sky_234(流浪者)回复于 2001-12-11 15:14:44 得分 0
filename:='c:\bmp\t11.gif';
try
with Query1 do
begin
close;
sql.clear;
sql.add('insert into image (asd) values(:imag)');
end;
try
if FileName<>'' then
query1.ParamByName('Imag').LoadfromFile(FileName,ftGraphic)
else
query1.ParamByName('Imag') .asBlob:='';
Query1.ExecSQL;
except
ShowMessage('图片保存出错!');
exit;
end;
except
end;Top




