F
flysand
Unregistered / Unconfirmed
GUEST, unregistred user!
服务器程序是d2006开发的webservice 服务器,用ADO连接SQL2000数据库;
客户端保存.doc或.BMP等文件时就会出错
procedure TAddFileForm.Button3Click(Sender: TObject);
begin
with clientdataset1do
begin
close;
RemoteServer:=SoapConnection1;
ProviderName:='SQLProvider';
commandtext:='insert INTO [files] ([fID],[fileData]) VALUES( :fID,:fileData)';
try
params.FindParam('fid').Value:=DBTextEdit1.Text;
Params.ParamByName('fileData').LoadFromfile(trim(fileFullName),ftBlob);
execute;
except
on e:exceptiondo
application.MessageBox(pchar(e.Message),'错误',0);
end;
end;
客户端保存.doc或.BMP等文件时就会出错
procedure TAddFileForm.Button3Click(Sender: TObject);
begin
with clientdataset1do
begin
close;
RemoteServer:=SoapConnection1;
ProviderName:='SQLProvider';
commandtext:='insert INTO [files] ([fID],[fileData]) VALUES( :fID,:fileData)';
try
params.FindParam('fid').Value:=DBTextEdit1.Text;
Params.ParamByName('fileData').LoadFromfile(trim(fileFullName),ftBlob);
execute;
except
on e:exceptiondo
application.MessageBox(pchar(e.Message),'错误',0);
end;
end;