🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.database
Article #49

Exclusive access problem - SQL DB Delphi Restore funciton

#49
From: Benn
Date: Thu, 17 Jun 2004 09:59
22 lines
1336 bytes
Hi,
I am trying to restore an sql database through a delphi application
using
ADO. Here is my code :

ADOConnection1.Execute('RESTORE DATABASE TEST FROM DISK =
'''+aFileName+'''');


When this executes I get the following error :

"Exclusive access could not be obtained because the database is in
use."

I have tried to set the mode of the ADO connection component to
cmShareExclusive. But this does not help.

Any help on solving this or finding another way of restoring the DB
through
delphi will be appreciated.

Thanks in advance
Technical Details
Message-ID: <9caabef0.0406170159.6ee04865@posting.google.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews2.google.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 115d96,a2d17d5075576a53,start
X-Google-Attributes: gid115d96,public
Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews2.google.com!not-for-mail
From: benn@orderwise.co.za (Benn)
Newsgroups: borland.public.delphi.database
Subject: Exclusive access problem - SQL DB Delphi Restore funciton
Date: 17 Jun 2004 02:59:18 -0700
Organization: http://groups.google.com
Lines: 22
Message-ID: <9caabef0.0406170159.6ee04865@posting.google.com>
NNTP-Posting-Host: 168.209.98.35
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1087466358 8731 127.0.0.1 (17 Jun 2004 09:59:18 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 17 Jun 2004 09:59:18 +0000 (UTC)