![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
|
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 (AT) cpjj (DOT) net> 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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |