Susan wrote: > Thanks Vernon & Marc-Andre for your replies. Your suggestion has been > helpful and I am running Microsoft Windows. The following: > > from win32com.client import Dispatch > conn = Dispatch(r'ADODB.Connection') > conn.Open("Dsn=xxx;uid=xxx;pwd=xxx") > conn.Execute('create table foo (blah char(30) )') > conn.Execute("insert into foo values('jenny')") > conn.Close() > > works and creates a table 'foo'. > > However, a simple select results in an error: > > from win32com.client import Dispatch > conn = Dispatch(r'ADODB.Connection') > conn.Open("Dsn=xxx;uid=xxx;pwd=xxx") > recset, affected = conn.Execute('select name from tablename') > conn.Close() > >>>> recset, affected = conn.Execute('select name from tablename') > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "<COMObject ADODB.Connection>", line 3, in Execute > File "C:\Python26\lib\site-packages\win32com\client\dynamic.py", > line 272, in _ApplyTypes_ > result = self._oleobj_.InvokeTypes(*(dispid, LCID, wFlags, > retType, argTypes) + args) > pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, None, > None, None, 0, -2147467259), None) > > Has anyone who has worked on old, esoteric databases before > encountered a similar problem and solved it?
We regularly add work-arounds for ODBC-driver quirks to mxODBC. This also includes providing custom versions supporting older versions of databases or ones that are not in common use. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Dec 08 2009) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try our new mxODBC.Connect Python Database Interface for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ _______________________________________________ DB-SIG maillist - DB-SIG@python.org http://mail.python.org/mailman/listinfo/db-sig