[python]pymssql去连接database由于名字含特殊字符总是失败,有什么解决方法没有

[python]pymssql去连接database由于名字含特殊字符总是失败,有什么解决办法没有
如题。。。
database名字为testdb2.8,最后传进去connect的名字显示为testdb2,一直连接失败,
有没有人碰到同样的问题,怎么解决的???

conn = pymssql.connect(host='192.168.1.10', user='sa', password='testtest', database='testdb2.8')
------解决思路----------------------
没用过mssql。

查看pymssql的源码,追本朔源,最后落到freeTDS的select_db函数,他的文档说:

引用
RETCODE dbuse (  DBPROCESS *  dbproc,
const char *  name

 
Change current database.

Analagous to the unix command cd, dbuse() makes name the default database. Waits for an answer from the server.

Parameters:
dbproc  contains all information needed by db-lib to manage communications with the server.
name  database to use.
Return values:
SUCCEED  query was processed without errors.
FAIL  query was not processed
Todo:
name should be quoted.

See also:
dbchange(), dbname().


不知道怎样“quote"数据库名。但可以试试:

加引号:database='"testdb2.8"'

加斜杠:database='testdb2\.8'