On Oct 5, 2012, at 9:40 AM, Ladislav Lenart wrote:
> Hello.
>
> I try to access a Microsoft SQL database from Linux (Debian testing):
>
> from sqlalchemy.ext.sqlsoup import SqlSoup
>
> conn_string = 'mssql+pymssql://user:pass@freetds_name'
> db = SqlSoup(conn_string)
> v = db.some_table.first()
> print v
>
> freetds_name is the section name from /etc/freetds/freetds.conf
>
> [freetds_name]
> host = ...
> port = 1433
> tds version = 7.1
> asa database = DB
>
> The above script fails
I dont have easy access to pymssql here so can you fully define what "fails"
means ? stack trace ?
> in pymssql on line 83, because line 81 sets vers to None:
>
> def _get_server_version_info(self, connection):
> vers = connection.scalar("select @@version")
> m = re.match(
> r"Microsoft SQL Server.*? - (\d+).(\d+).(\d+).(\d+)", vers)
> if m:
> return tuple(int(x) for x in m.group(1, 2, 3, 4))
> else:
> return None
>
> But the following works in tsql:
>
> 1> select @@version
> 2> go
>
> Microsoft SQL Server 2008 R2 (RTM) - 10.50.1617.0 (X64)
> Apr 22 2011 19:23:43
> Copyright (c) Microsoft Corporation
> Workgroup Edition (64-bit) on Windows NT 6.1 <X64>
> (Build 7601: Service Pack 1) (Hypervisor)
>
> (1 row affected)
>
>
> Any idea what is wrong?
>
>
> Thank you,
>
> Ladislav Lenart
>
> --
> You received this message because you are subscribed to the Google Groups
> "sqlalchemy" group.
> To post to this group, send email to [email protected].
> 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.
>
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected].
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.