Jochem,
I tried using the following code to disable the datasource:
    factory = CreateObject("java", "coldfusion.server.ServiceFactory");
    ds_service = factory.datasourceservice;
    dsources = ds_service.datasources;
    dsources["#attributes.DSN#"]["disable"] = "Yes";
    ds_service.restart();

I get the following error:
An exception occurred when executing a Com method. The cause of this exception
was that: AutomationException: 0x80004005 - You attempted to open a database
that is already opened exclusively by user 'Admin' on machine 'ANDYTRAVEL'.
Try again when the database is available. in 'Microsoft JET Database Engine'.

on the line:

<cfset Engine.CompactDatabase("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=#attributes.database#", "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=#attributes.tempdir#temp.mdb")>

So it does not look like the DB connection is disabled.

Any thoughts about what to try next?

Andy
  -----Original Message-----
  From: Jochem van Dieten [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, October 21, 2003 3:17 PM
  To: CF-Talk
  Subject: Re: MS Access Compression and Repair under MX

  Andy Ousterhout wrote:
  >
  > I am actually working off of your tag as a base and try to modify for MX.
I
  > am currently stuck at the point of trying to copy the file back to the
  > original DB

  Sorry, should have been
  http://spike.oli.tudelft.nl/jochemd/index.cfm?PageID=12

  It details how to disable a datasource and then restart the
  datasourceservice. If you are familiar with Java, there probably
  is an easier way to do it directly on the target connection itself.

  Jochem


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to