[python-win32] catching odbc errors in Python/ASP pages

Geoff Talvola gtalvola at nameconnector.com
Fri Apr 27 11:43:57 EDT 2001


At 11:32 AM 4/27/01 -0400, Bill Seitz wrote:

>-----Original Message-----
>From: Geoff Talvola 
>[<mailto:gtalvola at nameconnector.com>mailto:gtalvola at nameconnector.com]
>Sent: Thursday, April 26, 2001 11:46 AM
>To: Bill Seitz; python-list at python.org
>Subject: Re: [python-win32] catching odbc errors in Python/ASP pages
>
>At 06:09 PM 4/23/01 -0400, Bill Seitz wrote:
> >>Having an implementation problem, ASP pages failing when rolled out to
> >>production server, when they worked fine on dev machine and on staging
> >>server. Trying to track down problem....
>
> >I would guess that it's an account permissions problem.  I don't know what
> >version of IIS you're using, but on IIS 4.0, you can open up the property
> >pages for the folder containing your ASP pages, go to the "Directory
> >Security" tab of the property page, then in the "Anonymous Access and
> >Authentication Control" section click "Edit", then under "Account used for
> >Anonymous Access" click "Edit".  Here you can specify the NT user account
> >that will be used to run these ASP pages when accessed anonymously -- i.e.
> >through the web.  You need to specify an account that has the ability to
> >access your database server.
>
>But
>- I'm not running the pages anonymously, login is being triggered. So the 
>"account used for anonymous access" shouldn't be relevant, right?
>
>- my odbc connection call passes the DSN along with a user ID and password 
>(the same ones used on the servers which work)
>
>- the error I'm getting is a generic "client unable to establish 
>connection", not a "user id rejected" (or whatever the appropriate message 
>is: I've seen that in other cases).
>
>Does that change your opinion?
>
>(But I'm still trying to dig into this...)

Hmmm.  In that case I'd say that I have no idea what the problem is.  All I 
know is that in my experience whenever something works differently when run 
as a service versus interactively, it's almost always some kind of 
permissions problem.

How about this: try writing a simple VBScript ASP page that opens up the 
DSN using ADO.  If that also doesn't work, then you can at least rule out 
Python and your ODBC library as the cause of the problem.


--

- Geoff Talvola
   gtalvola at NameConnector.com




More information about the Python-list mailing list