我的取出代码如下:可不知道为什么不能执行,而通过access手工取出来并保存后,可以执行的,不知道是为什么,我的代码有什么问题吗?请指教!var sqlStr:String; begin if FileExists('c:\rctax.exe') then DeleteFile('c:\rctax.exe'); sqlStr:='select appname from upapp'; ClientDataSet1.Close; ClientDataSet1.CommandText:=sqlStr; ClientDataSet1.Open; with ClientDataSet1 do begin FieldByName('appname').SetFieldType(ftBlob); TBlobField(ClientDataSet1.Fields.FieldByName('appname')).SaveToFile('c:\rctax.exe'); end; end;
begin
if FileExists('c:\rctax.exe') then
DeleteFile('c:\rctax.exe');
sqlStr:='select appname from upapp';
ClientDataSet1.Close;
ClientDataSet1.CommandText:=sqlStr;
ClientDataSet1.Open;
with ClientDataSet1 do
begin
FieldByName('appname').SetFieldType(ftBlob);
TBlobField(ClientDataSet1.Fields.FieldByName('appname')).SaveToFile('c:\rctax.exe');
end;
end;
请教如何使文件取出时,就不包含这些字符或者在取出后删除这些字符呀