Thanks, that
works great! While using VBS ins ASP, I've never really cognitively separated
the ADO stuff from VBS itself, so it's taking a bit to get used to this =).
looks like Data Access _should_be_ handled exclusively through ADO instead of
trying to convert the ADO objects into some kind of native python Datatype and
then processing.
kinda too bad -
would be cool to have the recordset as a dictionary? not that i really know what
to do with dictionaries at this point. =)
Still, after a
couple days of hacking, I've managed to get the basics going - post-back forms
and database connectivity. all this while sticking very close to procedural
programming practices ( my background is PHP originally ). I'm
excited!
-----Original Message-----At 01:57 PM 04/06/2001 -0700, Griffiths, Jeff wrote:
From: Arthur Lee [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 04, 2001 6:50 PM
To: Griffiths, Jeff; Active Python (E-mail)
Subject: Re: Newbie: ADO & Python in ASP
But! I have yet to figure out how to loops through the RS to print out a whole table. trying this:
i = 0
for i < range(MyRS):
Response.Write(MyRS(0), MyRS(1))
MyRS.MoveNext
i = i + 1
Try this instead. (Note: MoveNext is a method, and needs to have '()' appended.)
while not MyRS.EOF and not MyRS.BOF:
Response.Write(MyRS(0), MyRS(1))
MyRS.MoveNext()
This returns an error on the range function - I can't get a range for the RS object. Obviously I have a lot to learn about python datatypes, statements, etc. A few hours of web searching and scanning py documentation has yielded little. Can anyone offer some poiters and/or point me to some documentation on this? Thanks in advance.
You are right, range() takes in integers and produce a "list". The above solution have very little to do with python. It works with ADO in general.
Arthur Lee