[python-win32] help with ASP, COM and ODBC
Jorgensen, Jens
jens.jorgensen@tallan.com
Thu, 20 Dec 2001 08:47:40 -0600
from win32com.client import Dispatch
db = Dispatch('ADO.Connection')
db.Open('Provider=blah;blah;blah')
rs, recs_affected = db.Execute('select a, b, from xyz')
while not rs.EOF :
print 'a = %s, b = %s' % (rs.Fields.Item(0).Value,
rs.Fields.Item(1).Value)
rs.MoveNext()
Mark Ainsworth wrote:
> I'm sorry if this has been asked before but there is so much info out
> there I don't know where to start looking.
>
> I've successfully set up an ODBC with IIS2 and can open it and close
> it from a python scripted ASP page. Now this may seem dumb , but are
> there any simple tutorials as to nowhow to access and use this data .
> I've got a record set, but how can I get the data out. ObjRS[x] comes
> back with "enumeration not allowed" errors. I can do objRS(x) with VB
> though !
>
> If it's documented somewhere then please just point me to the document.
>
> Thanks.
>
> *Mark Ainsworth*
>
> *Quality Manager*
>
> Sundance Multiprocessor Technology Ltd.
>
> Chiltern House, Waterside, Chesham, Bucks HP5 1PS
>
> Tel. +44 1494 793167 Fax. +44 1494 793168
>
> MarkA@sundance.com http://www.sundance.com
>
--
Jens B. Jorgensen
jens.jorgensen@tallan.com