procedure TForm1.Button1Click(Sender: TObject);
var strm1:tmemorystream;
begin
strm1:=tmemorystream.Create;
try strm1.LoadFromFile('c:/temp1.bmp');
ado1.Close;ado1.SQL.Clear;ado1.SQL.Add('select testbinary from table1');
ado1.Open;
ado1.Append;
(ado1.FieldByName('testbinary') as tblobfield).LoadFromStream(strm1);
ado1.Post;
finally strm1.Free;end;
end;
另外,不要用VARBINARY和BINARY,两者在SQL里面最大为8000字节,用IMAGE类型,
它为2的31次-1字节。