if you didnt have this problem with pymssql then please apply the patch I sent 
previously.

However, I'm going to bet the problem remains as it seems something is not 
right with how your database and/or client is configured.  I'm not familiar 
with the encoding pattern seen in your information_schema queries.  you may 
have to reproduce the issue using plain SELECT statements against 
information_schema and then seek outside help.



diff -r 17cab4ad55d5 lib/sqlalchemy/dialects/mssql/pymssql.py
--- a/lib/sqlalchemy/dialects/mssql/pymssql.py  Thu Oct 04 18:26:55 2012 -0400
+++ b/lib/sqlalchemy/dialects/mssql/pymssql.py  Fri Oct 05 18:46:01 2012 -0400
@@ -80,7 +80,7 @@
    def _get_server_version_info(self, connection):
        vers = connection.scalar("select @@version")
        m = re.match(
-            r"Microsoft SQL Server.*? - (\d+).(\d+).(\d+).(\d+)", vers)
+            r"\s*Microsoft SQL Server.*? - (\d+).(\d+).(\d+).(\d+)", vers)
        if m:
            return tuple(int(x) for x in m.group(1, 2, 3, 4))
        else:

On Oct 8, 2012, at 12:10 PM, Ladislav Lenart wrote:

> Hello.
> 
> I adjusted the ODBC/FreeTDS condifugration according to your suggestions but
> still get the "NoSuchTableError: mlm_spol".
> 
> freetds.conf:
> 
> [zfp]
> host = 10.230.128.140
> port = 1433
> tds version = 8.0
> asa database = ZFP_CRM
> client charset = utf8
> text size = 50000000
> 
> 
> odbc.ini:
> 
> [ODBC Data Sources]
> zfp = test
> 
> [zfp]
> Driver = /usr/lib/libtdsodbc.so
> Description = test
> Trace = No
> Servername = zfp
> 
> 
> odbcinst.ini (for the sake of completeness):
> 
> [FreeTDS]
> Driver = /usr/lib/libtdsodbc.so
> UsageCount = 2
> 
> 
> The code:
> 
> from sqlalchemy.engine import create_engine
> from sqlalchemy.ext.sqlsoup import SqlSoup
> 
> if __name__ == '__main__':
>    engine = create_engine("mssql://efractal:efR@cZFP13@zfp", echo='debug')
>    db = SqlSoup(engine)
>    x = db.mlm_spol.fetchone()
>    print x
> 
> 
> still fails with NoSuchTableError: mlm_spol
> 
> Its debug output is the same as in my previous email which used different
> connect style.
> 
> And the code that uses db.execute('select * from mlm_spol').fetchone() still
> works...
> 
> Any other ideas?
> 
> Ladislav Lenart
> 
> 
> On 8.10.2012 17:45, Michael Bayer wrote:
>> your freetds datasource should be configured with CLIENT_CHARSET=utf8 as I 
>> illustrated earlier:
>> 
>> [ms_2005]
>>      host = 172.16.248.128
>>       port = 1213
>>       tds version = 8.0
>>       client charset = UTF8
>>       text size = 50000000
> 

-- 
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.

Reply via email to