Barton schrieb:
> Let me first say that I am having great fun and success with comtypes!

Cool!

> A recent project required a connection to an MS Jet database, so I 
> downloaded adodbapi.  Those guy have their reasons (I suppose) for 
> choosing pywin32 - and providing IronPython (yuck) support.
> 
> Here's what I've been up to:
> Just for fun I replaced adodbapi's pythoncom dispatch with 
> CreateObject("ADODB.Connection") - custom.
> Things went along just fine until I tried to fetch many columns from 
> the db:
> The custom interface returned the expected length list fo rows, but 
> the rows (tuples) were of lenght = 1 containing the corect data for 
> the first column.
> 
> After some time poking around in comtypes and reading the mail list, I 
> tried CreateObject("ADODB.Connection", dynamic=True) .
> Success!! All rows are fetched properly!

> I then decided to re-organize and rename the module - maybe someday 
> breath new life into one of the earlier, sleeping projects -
> adodbapi turns out to be very cumbersome to type and I trying to find 
> a way to work "comtypes" into the name - but I digress...
Let me try to make sure I understand you correctly (being no native english
speaker): you don't like to type the word 'adodapi' ;-) ?
> 
> Once I could see the mechanics of the module, I began to look at the 
> inner workings:
> It seems that comtyps is doing all the type conversion of individual 
> fields of the query result (something that the original module worked 
> very hard at) before the data (list of tuples) arrives.
> 
> So, I'm trying to understand if a "custom" interface should have 
> behaved differently, if this "dynamic" behavior can be explained in a 
> few word, if there are any pitfalls that I may be headed for, and if 
> pythoncom lacks this kind type conversion.

Well. comtypes is very young, compared to pywin32, and 'dynamic=True' is
even much younger.  We have still to understand all the differences
between the three ways that comtypes provides: custom interface,
dynamic dispatch (using the comtypes.client.dynamic module), and
'dynamic=True' (which is using the new comtypes.client.lazybind module).
Ideally they should all behave the same...

I cannot answer your third question 'if pythoncom lacks this kind of type
conversion' since I don't use it any more.

If you can provide a script that exercises some adodb commands, I will
try to convert that into a comtypes unittest and may be able to look
into differences of the three ways.

> I appreciate any thoughts on this.
> Thank you,
> Barton 
> 

-- 
Thanks,
Thomas


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
comtypes-users mailing list
comtypes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/comtypes-users

Reply via email to