Re: Jet database engine cannot open the file ...already opened, etc



Chuck,

Thanks for following up your own post. It prevents others from wasting their
time trying to help you after you have solved the problem, and it helps
others when you share your solution.


--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous

You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf


"Chuck Jungmann" <NOchuckSPAM@xxxxxxxx> wrote in message
news:nvg6l2hinplgblgk2nn1dr362hpcn9d2j1@xxxxxxxxxx
In case anyone has a similar problem, my error was in setting the
connection properties. I was setting the DTS connection by parsing the
working ADO Connection string. Because of the space, I had put
single-quotes around the 'DBase IV' value of the Extended Properties.
ADO could open a recordset with that variation, but DTS couldn't, and
probably shouldn't have.

On Wed, 08 Nov 2006 12:39:06 -0600, Chuck Jungmann
<NOchuckSPAM@xxxxxxxx> wrote:

I want to automate the import of certain databases to SQL Server.
Rather than having to interactively use the Import/Export Wizard, I
wrote a WSF program to prepare the DTS Package, Steps, and Tasks,
using DTS Wizard job saved as Visual Basic.

The file I am working with is DBaseIV. After it fails, the log file
reports the following error:

The Microsoft Jet database engine cannot open the file xxx. It is
already opened exclusively by another user, or you need permission to
view its data.

I am running this application on a workstation separate from SQL
Server, but I have also attempted to run it on the SQL Server host
computer. In both cases, the log file reports the same error.

Googling around for answers, I've noticed some people mentioning
running the DTS as "a job." I don't know if that's a different animal
from WSF as far as permissions, etc.

The same WSF script can open the DBaseIV file with ADO to get a
schema that I use to prepare the DTS calls. I close the connection
before proceeding to the DTS code. That makes me wonder it it's really
the permissions that are the problem, or there is something more
subtle than I currently comprehend.

Any advice?

Thanks



.