ODBC, mxODBC problem

Gordon McMillan gmcm at hypernet.com
Sat Feb 19 22:02:18 CET 2000

rockjock810 at my-deja wrote:

> I didn't have any problems making it work on the same WinNT machine
> using Perl. And yes, the DSN was defined in the ODBC manager. I suspect
> that Python seems to treat WinNT network shares rather odd. Maybe a
> little enlightenment on how it interacts with other servers would do
> the trick. I tried this script:
> n=open(r"\\www\c$\cgi-bin\test.dat","r+")
> and I've been getting "Permission denied" messages. 

I can open files that way, so the "Permission denied" probably 
means just what it says.

Earlier you wrote:
> odbc.odbc("express/Admin/")
> odbc.odbc("express/Admin")

> Not one works. And with mxODBC:

> ODBC.Windows.ODBC("express","Admin","")

> Not much luck here either. I tried running said statement(s) 
> Pythonwin's interactive mode, and it works. 

What does it fail with as a script? Are you trying to run this as 
a CGI (where you are almost certainly running under a different 

Earlier still you wrote:

> Traceback (innermost last): File "d:\the-cafe\cgi-
bin\express.py", line
> 25, in ? db=odbc.odbc("express") dbi.operation-error: 
> [Microsoft][ODBCMicrosoft Access 97 Driver] The Microsoft 
Jet database engine cannot
> open the file '(unknown)'. It is already opened exclusively by 
> user, or you need permission to view its data. in LOGIN

Hmm. Yup. Running as a CGI, and the web server is almost 
certainly not running you in an account that has permission.

- Gordon

More information about the Python-list mailing list