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? .S _______________________________________________ DB-SIG maillist - DB-SIG@python.org http://mail.python.org/mailman/listinfo/db-sig