adoquery1.Close;
adoquery1.ConnectionString:='Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=check';
try
with adoquery1 do
begin
close;
sql.Clear;
sql.Add('backup database check to disk='''+DestinationPath.Caption+'\'+edit1.text+'.bak'' with init');
Execsql;
end;
showmessage('备份完成。');
end;
运行时错误提示“check附近有语法错误”。请高手指点
adoquery1.ConnectionString:='Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=check';
try
with adoquery1 do
begin
close;
sql.Clear;
sql.Add('backup database check to disk='''+DestinationPath.Caption+'\'+edit1.text+'.bak'' with init');
Execsql;
end;
showmessage('备份完成。');
end;
运行时错误提示“check附近有语法错误”。请高手指点
adoquery1.ConnectionString:='Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=check';
try
with adoquery1 do
begin
close;
sql.Clear;
sql.Add('backup database [check] to disk='''+DestinationPath.Caption+'\'+edit1.text+'.bak'' with init');
Execsql;
end;
showmessage('备份完成。');
end;