Hi, Have a go using pyodbc instead of adodbapi. An easy way to force SA to use pyodbc is to uninstall adodbapi (and pymssql if you have that installed).
Paul Victor Ng wrote: >I'm getting some pretty strange behavior when connecting to SQL >Server. > >My code is pretty straight forward, just create an engine, create >metadata, introspect on a table... > > >from sqlalchemy import * >db = create_engine('mssql://./msdb') >meta = BoundMetaData(db) >tbl = Table('sysdtssteplog', meta, autoload=True) > >Those 4 lines yield an exceptoin o the last line: > >Strategy 4: Traceback:Traceback (most recent call last): > File "build\bdist.win32\egg\adodbapi\adodbapi.py", line 540, in >executeHelper > > File "<COMObject ADODB.Command>", line 3, in Execute > File "c:\python24\lib\site-packages\win32com\client\dynamic.py", >line 258, in > _ApplyTypes_ > result = self._oleobj_.InvokeTypes(*(dispid, LCID, wFlags, >retType, argTypes >) + args) > com_error: (-2147352567, 'Exception occurred.', (0, 'Microsoft OLE DB >Provider >for SQL Server', 'Cannot create new connection because in manual or >distributed >transaction mode.', None, 0, -2147467259), None) > >--- ADODBAPI on command:SELECT [C].[COLUMN_NAME], >[TABLE_CONSTRAIN_8109].[CONSTR >AINT_TYPE] >FROM [INFORMATION_SCHEMA].[KEY_COLUMN_USAGE] AS C, >[INFORMATION_SCHEMA].[TABLE_C >ONSTRAINTS] AS [TABLE_CONSTRAIN_8109] >WHERE [TABLE_CONSTRAIN_8109].[CONSTRAINT_NAME] = [C].[CONSTRAINT_NAME] >AND [C].[ >TABLE_NAME] = ? with parameters: ['sysdtssteplog'] 'SELECT [C]. >[COLUMN_NAME], [T >ABLE_CONSTRAIN_8109].[CONSTRAINT_TYPE] \nFROM [INFORMATION_SCHEMA]. >[KEY_COLUMN_U >SAGE] AS C, [INFORMATION_SCHEMA].[TABLE_CONSTRAINTS] AS >[TABLE_CONSTRAIN_8109] \ >nWHERE [TABLE_CONSTRAIN_8109].[CONSTRAINT_NAME] = [C]. >[CONSTRAINT_NAME] AND [C]. >[TABLE_NAME] = ?' ['sysdtssteplog'] > > >If I try to assign tbl one more time, I get no exception. Verry odd >and I've had no luck debugging this in sqlalchemny. > >vic > > >> > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---