procedure TForm1.Button1Click(Sender: TObject);
begin
{try
adoc.Prepared:=true;
adoc.CommandText:='sp_addumpdevice ''disk'',''accountbackup'',''c:/mssql7/backup/account.bak'''; //±¸·ÝÊý¾Ý¿â
adoc.Execute;
adoc.Prepared:=true;
adoc.CommandText:='backup database account to accountbackup'; //±¸·ÝÊý¾Ý¿â
adoc.Execute;
messagebox(self.Handle,pchar('Êý¾Ý¿â±¸·Ý³É¹¦!'),'Êý¾Ý¿â±¸·Ý',MB_OK+MB_ICONINFORMATION);
finally
adoc.Prepared:=true;
adoc.CommandText:='sp_dropdevice ''accountbackup''';
adoc.Execute;
end;}
//try
//adoc.Prepared:=true;
//adoc.CommandText:='sp_addumpdevice ''disk'',''bigconsumer'',''c:/mssql7/backup/bigconsumer1.bak''';
//adoc.Execute;
adoc.Prepared:=true;
adoc.CommandText:='backup database bigconsumer to disk=''c:/mssql7/backup/bigconsumer1.bak''';
adoc.Execute;
showmessage('Íê³É');
//finally
//adoc.Prepared:=true;
//adoc.CommandText:='sp_dropdevice ''bigconsumer''';
//adoc.Execute;
//end;
end;