mina_84
جمعه 29 اردیبهشت 1385, 14:33 عصر
سلام من از برنامه زیر برای restore نسخه بشتیبان استفاده کردم
try
ADOCommand1.CommandText := 'Use Master';
ADOCommand1.Execute();
if OpenDialog1.Execute then
begin
ADOCommand1.CommandText := 'Restore database '+'نام دیتا بیس'+' From disk='+QuotedStr(OpenDialog1.FileName);
ADOCommand1.Execute();
ShowMessage('عملیات بازیابی با موفقیت انجام شد');
end;
Except
ShowMessage('عملیات بازیابی با شکست مواجه شد');
end;
ولی بیغام خطای زیر رو میده
لطفا منو راهنمایی کنید
project project1.exe raised exception class eoleexception with message 'exclusive access could not be
obtained because the database is in use' .process stop.
try
ADOCommand1.CommandText := 'Use Master';
ADOCommand1.Execute();
if OpenDialog1.Execute then
begin
ADOCommand1.CommandText := 'Restore database '+'نام دیتا بیس'+' From disk='+QuotedStr(OpenDialog1.FileName);
ADOCommand1.Execute();
ShowMessage('عملیات بازیابی با موفقیت انجام شد');
end;
Except
ShowMessage('عملیات بازیابی با شکست مواجه شد');
end;
ولی بیغام خطای زیر رو میده
لطفا منو راهنمایی کنید
project project1.exe raised exception class eoleexception with message 'exclusive access could not be
obtained because the database is in use' .process stop.