procedure TForm14.SpeedButton1Click(Sender: TObject);
begin
label2.Visible :=true;
adoquery1.Close ;
adoquery1.ConnectionString :='Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=xiexie;Data Source=FILESSERVER' ;
try
with adoquery1 do
begin
close;
sql.Clear ;
sql.Add('backup database xiexie to disk=''' + Edit1.Text + '''');
execsql;
end;
progressbar1.Position :=1;
animate1.Active :=true;
timer1.Enabled :=true;
except
on e:exception do
showmessage('备份失败。');
end;
end;
以上这些代码完全备份数据库到服务器的硬盘上,但我想将该数据库备份到客户端(如:我的程序在局域网的客户端,SQL数据库在FILESSERVER服务器上,备份时是在客户端直接选择本地路径''' + Edit1.Text + ''',然后备份,我将''' + Edit1.Text + '''修改为\\192.1.1.6\e:\xiexie.bak),他将提示出错,怎么改,大吓闷,帮帮忙呀,我等着救命的,,,,,,,,,
begin
label2.Visible :=true;
adoquery1.Close ;
adoquery1.ConnectionString :='Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=xiexie;Data Source=FILESSERVER' ;
try
with adoquery1 do
begin
close;
sql.Clear ;
sql.Add('backup database xiexie to disk=''' + Edit1.Text + '''');
execsql;
end;
progressbar1.Position :=1;
animate1.Active :=true;
timer1.Enabled :=true;
except
on e:exception do
showmessage('备份失败。');
end;
end;
以上这些代码完全备份数据库到服务器的硬盘上,但我想将该数据库备份到客户端(如:我的程序在局域网的客户端,SQL数据库在FILESSERVER服务器上,备份时是在客户端直接选择本地路径''' + Edit1.Text + ''',然后备份,我将''' + Edit1.Text + '''修改为\\192.1.1.6\e:\xiexie.bak),他将提示出错,怎么改,大吓闷,帮帮忙呀,我等着救命的,,,,,,,,,
恢复呢,用什么命令啊,请指教.
在两台 WIN2000 PC 通信中,要传输文件,必须有权限控制,
WIN98安全性能很差,如果在此98,你这种做法有可能成功.
'@filename1 = N'+char(39)+ExtractFilePath(paramstr(0))+'通迅录_Data.MDF'+char(39)+
','+'@filename2 = N'+char(39)+ExtractFilePath(paramstr(0))+'通迅录_Log.LDF'+char(39);
ADOCommand.CommandText := s;
ADOCommand.Execute();
Messagebox(handle,'数据库安装成功!','提醒',MB_OK+MB_ICONINFORMATION);
end;