Title: Newbie: ADO & Python in ASP

Hi

Am just starting to explore Python as an ASP scripting language. I use ADO to connect to Oracle, and am frankly little baffled with what I'm to do with the Recordset when I get it back.

This works fine:

connectionStr = "Provider=MSDAORA.1;User ID=f00;Data Source=f00;User Id=f00;PASSWORD=f00;"
connection = Server.CreateObject("ADODB.Connection")
connection.Open(connectionStr)

SQL = "SELECT * FROM f00.f00"

MyRS = Server.CreateObject("ADODB.Recordset")
MyRS = connection.execute(SQL)

And from this I can go and print out:

Response.Write( MyRS(0) )

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

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.

Jeff Griffiths
Web Developer
Genus RMT Inc.
[EMAIL PROTECTED]
( 604 ) 661 5351

Reply via email to