[IronPython] How do I determine whether a database supports transactions?

Shri Borde Shri.Borde at microsoft.com
Thu Aug 21 22:54:03 CEST 2008


IPy does intend to support COM well. See http://blogs.msdn.com/shrib/archive/2008/07/30/idispatch-support-on-in-ironpython-beta-4.aspx. If something does not work, please do report a bug.

The following worked for me. So using the natural indexing syntax is what you need.

c:\vsl\Merlin\Main>ipyd
>>> import System
>>> t = System.Type.GetTypeFromProgID("ADODB.Connection")
>>> com = System.Activator.CreateInstance(t)
>>> com.Properties[com.Properties.Count - 1]
<System.__ComObject (Property) object at 0x000000000000002F>
>>> com.Properties[com.Properties.Count]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
EnvironmentError: Item cannot be found in the collection corresponding to the requested name or ordinal.
>>>

Thanks,
Shri


-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Curt Hagenlocher
Sent: Thursday, August 21, 2008 5:57 AM
To: Discussion of IronPython
Subject: Re: [IronPython] How do I determine whether a database supports transactions?

On Wed, Aug 20, 2008 at 10:55 PM, Seo Sanghyeon <sanxiyn at gmail.com> wrote:
>
> 2008/8/21 Curt Hagenlocher <curt at hagenlocher.org>:
> > In the long term, I think you're definitely better off rewriting against
> > ADO.NET, but I can certainly see the attraction in getting something to work
> > more quickly if you can continue to use the COM ADO objects.
>
> Especially, when it seems to me that interface provided by
> CPython/win32com is almost compatible with IronPython/.NET COM
> interop.

Definitely.  No doubt I'm just bitter as a result of bad experiences
with "classic ADO" at my previous job. :)

--
Curt Hagenlocher
curt at hagenlocher.org
_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com




More information about the Ironpython-users mailing list