我的数据库备份程序是这样写的
procedure Tformsjgl51.FormCreate(Sender: TObject);
var
sourcepath:string;
begin
sourcepath:=extractfiledir(application.ExeName);
if(strlen(pchar(sourcepath))<>3) then
sourcepath:=sourcepath+'\';
edit1.Text:=sourcepath+'backupdata\chinamag'+formatdatetime('yyyymmdd',date)+'.back';end;procedure Tformsjgl51.Button2Click(Sender: TObject);
begin
adocommand1.CommandText:='backup database chinamag to disk="'+edit1.Text+'"';
try
formsjgl51.ADOCommand1.Execute;
showmessage('数据备份成功!');
except
showmessage('数据备份失败,请您与程序开发商联系');
end;
错误提示为:
project chinamag.exe raised exception class eoleexception with message'第一行:‘E\chianmag\backupdata\chinamag20031230.back'附近有语法错误,
我实在是看不出来有什么错误,请高手赐教。