請教有關用ado處理blob的問題 |
缺席
|
yabula
初階會員 ![]() ![]() 發表:47 回覆:117 積分:42 註冊:2002-10-02 發送簡訊給我 |
小弟在李維大師的實戰delphi5.x ADO/MTS/COM 書中的範例,用ado處理blob的問題,我按範例做的時候,都沒有問題,但是加入到我自己的程式中發生datasource1.DataSource1DataChange一直run了十幾次後產生錯誤訊息如下
project a.exe raise exception class EOleException with message
'Multiple-step operation generated errors,check each status value' procedure TForm1.Button1Click(Sender: TObject);
var
im_filename:string; //2002/11/20 by ivam
function blobcontenttostring(aa:string):string;
begin
with tfilestream.create(aa,fmopenread) do
try
setlength(result,size);
read(pointer(result)^,size);
finally
free;
end;
end;
begin
if opendialog1.Execute then
begin
query1.Edit;
im_filename:=opendialog1.FileName;
query1.FieldByName(s).asstring:=blobcontenttostring(im_filename);
query1.post;
end; end;
|
hagar
版主 ![]() ![]() ![]() ![]() ![]() ![]() 發表:143 回覆:4056 積分:4445 註冊:2002-04-14 發送簡訊給我 |
|
yabula
初階會員 ![]() ![]() 發表:47 回覆:117 積分:42 註冊:2002-10-02 發送簡訊給我 |
|
yabula
初階會員 ![]() ![]() 發表:47 回覆:117 積分:42 註冊:2002-10-02 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |