3

I am a new to python programming and i want to write a python program to read and write data to and from the database.

The connection code is as follows:

DNS='catalog'
DRV = '{Microsoft Access Driver (*.mdb)}'
conn = pyodbc.connect('DRIVER=%s;DSN=%s;' % (DRV,DNS))

catalog is the DSN name.

I am am getting the following error:

Traceback (most recent call last):
File "C:\Python27\exampes\xxx.py", line 8, in <module>
conn = pyodbc.connect('DRIVER=%s;DSN=%s;' % (DRV,DNS))
Error: ('01000', "[01000] [Microsoft][ODBC Microsoft Access Driver]General Warning  Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x12b4 Thread 0x1544  DBC 0x567ea4 Jet'. (1) (SQLDriverConnect);
[01000] [Microsoft][ODBC Microsoft Access  Driver]General Warning Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x12b4 Thread 0x1544 DBC 0x567ea4 Jet'. (1)"

Can anyone please help me..?

2
  • @Gord Thompson : I wonder how can a question asked two years ago could possibly duplicate of a question which was asked 7 days ago ?? Commented Oct 14, 2014 at 15:00
  • I was trying to point future readers to a more complete answer to this question. (See my comment to the answer.) I have reopened the question. Commented Oct 14, 2014 at 18:39

2 Answers 2

2

The account under which you are running is not an administrator. It needs registry access as per the message (also described here)

Registry access is needed to find the ODBC driver for MS Access.

Sign up to request clarification or add additional context in comments.

1 Comment

For future readers: This is only one possible cause of the error message, and a relatively uncommon one at that. Other causes and solutions are outlined in another answer here.
0

try to uncheck Attributes: Read-only box in file properties.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.