[python-win32] ASP Python
Jorgensen, Jens
jens.jorgensen@tallan.com
Tue, 10 Jul 2001 09:40:14 -0500
Jim Abrams wrote:
>Also, some strange calls don't return what you expect.
>objCN = Server.CreateObject("ADODB.Connection")
>objCN.open(dsn)
>objRS = objCN.Execute("select * etc")
>objRS now has a tuple of (<RecordSetObject>, int)
>I have no idea what the int means, but you need to trim it away to get
>at the RecordSet object.
>
Ok, well I obviously didn't know that Application wasn't just a simple
Dispatch object in asps but this one I do know! The reason Execute
returns a tuple is because Execute has an [out] parameter which returns
the number of rows affected. Here's the clip from OLEVIEW:
_Recordset* Execute(
[in] BSTR CommandText,
[out, optional] VARIANT* RecordsAffected,
[in, optional, defaultvalue(-1)] long Options);
Any COM [out] parameter will be returned from the method since in Python
parameters are passed by value rather than by reference (we won't talk
about object references).
--
Jens B. Jorgensen
jens.jorgensen@tallan.com