On Oct 8, 2012, at 11:10 AM, Ladislav Lenart wrote: > Ok, I will give it yet another try, but please note that the following works: > > import pyodbc > from sqlalchemy.engine import create_engine > from sqlalchemy.ext.sqlsoup import SqlSoup > > def connect(): > return > pyodbc.connect('DRIVER={FreeTDS};SERVER=10.230.128.140;PORT=1433;DATABASE=ZFP_CRM;UID=efractal;PWD=efR@cZFP13;TDS_VERSION=8.0;') > engine = create_engine('mssql+pyodbc://', creator=connect) > db = SqlSoup(engine) > x = db.execute("select * from mlm_spol").fetchone() > print x > > > i.e. raw SqlSoup.execute() sees the table and returns a valid result. > > > I regard this as a proof that the connection was established successfully and > the problem lies elsewhere. Am I wrong?
perhaps. Maybe the connection doesn't have correct access to the information schema tables, as SQLSoup relies upon table reflection. you'd need to run with echo='debug' on your engine to see exactly what queries are being emitted and the rows being returned, and determine why an information schema row for "mlm_spol" isn't being returned. -- 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 sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.