Vijay Sankar wrote:
Stuart Henderson wrote:
Vijay Sankar wrote on misc@:
when I tried to compile pyodbc, I got errors saying that -liodbc not recognized.

if you can get iodbctest working, here's a pyodbc port you can try.

Thanks very much. The pyodbc port compiled and installed properly on 4.5 -stable. I am able to use py-sqlalchemy to connect. However, I get the error

~/Workfolder/Fleetweb $ idle2.5
Fatal Python error: Unable to set SQL_ATTR_CONNECTION_POOLING attribute.

The code I used to test this was as follows:

import sqlalchemy
from sqlalchemy import create_engine
engine = create_engine('mssql://sa:sql2005@/?dsn=MSSQL-pmnew?driver=FreeTDS')
# engine = create_engine('mssql://sa:sql2...@mssql-new')
# engine = create_engine('mssql://sa:[email protected]/pmnew?driver=FreeTDS&port=1433')
# engine = create_engine('mssql://MSSQL-pmnew')
connection = engine.connect()
result = connection.execute("select * from CabType")
for row in result:
   print row['CabTypeCode'], row['Description']
result.close()

I tried FreeTDS with msdblib flavor as well as the plain one.

I will read up on this in case this has nothing to do with the port and try again tomorrow.

Thanks again,

Vijay

If I do a

import pyodbc
pyodbc.pooling = False

pooling errors disappear. So everything seems to be great with the port. I will do further tests over the next week and report back any problems.

Thanks again,

Vijay

--
Vijay Sankar, M.Eng., P.Eng.
ForeTell Technologies Limited
59 Flamingo Avenue, Winnipeg, MB, Canada R3J 0X6
Phone: (204) 885-9535, E-Mail: [email protected]

Reply via email to