Dean
unread,Feb 7, 2012, 12:57:25 AM2/7/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pyodbc
Hi,
I'm trying to connect to one Access 2003 database and run a SQL query
to create tables in another Access database. I've successfully
connected to 'Admin' database and created the cursor. I then tried to
run the SQL query through 'execute', but it comes up with:
Traceback (most recent call last):
File "<pyshell#22>", line 1, in <module>
cursorAdmin.execute("""SELECT dbo_CompositeSampComponent.*,
dbo_vw_DAL_CompSamp.ProcessName INTO gdmsCompositeSampleComponent IN
'T:\GDM Project\GDMS Export.mdb' FROM dbo_CompositeSampComponent INNER
JOIN dbo_vw_DAL_CompSamp ON dbo_CompositeSampComponent.SampleID =
dbo_vw_DAL_CompSamp.CompositeID;""")
Error: ('HY000', "[HY000] [Microsoft][ODBC Microsoft Access Driver]
The Microsoft Jet database engine cannot open the file 'T:\\GDM Project
\\GDMS Export.mdb'. It is already opened exclusively by another user,
or you need permission to view its data. (-1032) (SQLExecDirectW)")
I thought that maybe you need to be connected to both and so I also
connected to the 'Export' database, but no luck. What am I missing?
I know nobody else is connected. I seem to be locking it for myself.
Help, please.