最高只能给100分,否则给1000分也没问题
我的信箱是sfply@sfply.net
我想在ACCESS数据库中处理存储,但没有找到过相关资料,请大家帮一个忙!谢谢!
var image:string;
image:=opendialog1.filename;
with Query1 do
begin
Close;
Sql.Clear;
Sql.Add(insert into tablename (field1, field2, tp) values(:field1, :field2, :tp));
....
....
Parameters.ParamByName(tp).LoadFromFile(image,ftGraphic);
ExecSQL:
end;
请用以下代码:
var
picturename,extname:string;
Jpegimage:TJpegImage;
begin
with Qorder_master do begin
if isempty then exit;
if openpicture.Execute then begin
picturename:=openpicture.FileName;
extname:=extractfileext(picturename);
if uppercase(extname)=.BMP then
begin
edit;
dbimage.Picture.LoadFromFile(openpicture.filename);
Post;
end;
if (uppercase(extname)=.JPG) OR (uppercase(extname)=.JEPG) then
begin
Jpegimage:=Tjpegimage.Create;
try
Jpegimage.LoadFromFile(picturename);
edit;
dbimage.Picture.Graphic.Assign(Jpegimage);
Post;
finally
jpegimage.Free;
end;
end;
end;
Edit ;
end;
end;