谁能给我看一下,我这个数据库还原错在哪里了?我做好以后不但不能还原,还老师提醒我“data/\data/文件夹不存在,是否创建”!
var
opstruc:tshfileopstruct;
frombuf,tobuf:array[0..128]of char;
begin
timer1.Enabled:=true;
progressbar1.Position:=0;
fillchar(frombuf,sizeof(frombuf),0);
fillchar(tobuf,sizeof(tobuf),0);
strpcopy(frombuf,pchar('backup/kcgl.mdb'));
strpcopy(tobuf,pchar('data/'));
with opstruc do
begin
wnd:=handle;
wfunc:=fo_copy;
pfrom:=@frombuf;
pto:=@tobuf;
fflags:=fof_noconfirmation or fof_renameoncollision;
fanyoperationsaborted:=false;
hnamemappings:=nil;
lpszprogresstitle:=nil;
end;
if shfileoperation(opstruc)=0 then
begin
end;