Problem : using ADO in ASP

Mark Hammond mhammond at skippinet.com.au
Tue Feb 1 07:16:16 EST 2000


<toberstein at my-deja.com> wrote in message
news:86vjhe$grb$1 at nnrp1.deja.com...
> I am using Python as an ActiveX Scripting Engine
> in ASP/IIS and want to use ADO to connect to a
> ODBC-compliant DB (in fact Access).
>
> VBScript Code works - so there should be no setup
> problem. Python in ASP Pages also works.

The traceback gives you a clue:


> Output from Python :
>
>
> Python ActiveX Scripting Engine error '80020009'
>
> Traceback (innermost last): File "<Script Block
> >",
>  line 7, in ? Response.Write( rs.Fields("name") )
> AttributeError:
>  'tuple' object has no attribute 'Fields'

The problem is that for some reason, rs is a "tuple" object - I
suggest adding a "print" statement (or more likely a
"Response.Write("rs = " + repr(rs))"

Note that if you add an "import win32traceutil" line anywhere, you can
use the Pythonwin "tools" menu to start a collector that will pick up
any print statements you may add...

Mark.






More information about the Python-list mailing list