Help with Script Task an Access database

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi! I have a problem with a SSIS.

I want to compact an Access Database within a script task. The problem is
that when the code is going to execute the command (CompactDatabase) it
produces the followin error:

"You attempted to open a database that is already opened exclusively by user
'Admin' on machine 'XXXX'. Try again when the database is available."

I'm using a native OLEDB connection to connect with the access database and
I use this connection in a Data Flow Task to transfer data from a SQL Server
to the Access database. I supposed that this connection is still open when I
tried to compact the database with the Script Task (after this Data Flow
Task is finished). I'd tried to close the connection in the Script Task but
I need an ADO.Net connection to do that (referencing the connection with
Dts.Connections("ConnectionName").AcquireConnection(Dts.Transaction)), but I
can't use an ADO.Net connection in the Data Flow Task as a destination (only
OLDB).

Do you unterstand my problem? How can I compact the access database?

Thanks a lot.

Jaime Lucci
jaimelucci@xxxxxxxxxxx
Salta - Argentina


.



Relevant Pages

  • jetengine compact reopening connection error
    ... When i close a connection to compact an access database, ... connection renders an errorno -2146825068 stating: "Supplied provider ...
    (borland.public.delphi.database.ado)
  • Re: How to use access query computed fields in Word mailmerge
    ... Once you have gone through the connection process once, ... To make a DDE connection in code from Word 2000/2002 I think you will need ... My access databases have lots of these computed query ... >>> an access database with any data in it. ...
    (microsoft.public.word.mailmerge.fields)
  • Re: How to stop source prompt in mail merge from access
    ... Are you calling OpenDataSource in your Access code? ... connection from the Word mail merge main document because Word will try to ... > The mail merge is being called from the Access database via a Visual Basic ...
    (microsoft.public.word.mailmerge.fields)
  • Re: error messages when connecting to an MS Access query
    ... I'm actually opening the Word document from VBA in the Access database, ... It's actually easy to run a Make Table query in Access, ... I got messages saying it couldn't make the connection. ... When you try to make a DDE connection, if the database is not already ...
    (microsoft.public.word.mailmerge.fields)
  • Re: JDBC Applets - MS Access
    ... > I am working on a Applet at the moment which must be able to access ... > I need to be able to setup a jdbc connection to an Access database. ... JDataConnect also uses a server side JDBC server. ...
    (comp.lang.java.databases)