freetds

Having Troubles with UnixODBC, FreeTDS, and PyODBC

送分小仙女□ 提交于 2019-11-27 02:18:58
问题 I am having great difficulty getting all three of these to work together in harmony. I guess I'll list all the various configurations, along with the test code to see if a pair of fresh eyes can realize my stupidity. I'm running 12.04 Ubuntu Server and I'm trying to connect to a MSSQL Server 2008 and end up using it with PyODBC. However, when just putting in tsql -S T2 -U Foo -P Bar I get the 1> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> and etc. Anyway, if anyone would be able to help (and I would be

Getting data with UTF-8 charset from MSSQL server using PHP FreeTDS extension

耗尽温柔 提交于 2019-11-27 01:02:00
I can't seem to get data from MSSQL encoded as UTF-8 using FreeTDS extension. Connecting: ini_set('mssql.charset', 'UTF-8'); $this->_resource = mssql_connect($config['servername'], $config['username'], $config['password']); I have no ability to use any other extension. I've tried creating ~/.freetds.conf [global] client charset = UTF-8 I've tried passing parameters to php: php -d mssql.charset="UTF-8" index.php Data is still not in UTF-8. php -i mssql MSSQL Support => enabled Active Persistent Links => 0 Active Links => 0 Library version => FreeTDS Directive => Local Value => Master Value

SqlAlchemy equivalent of pyodbc connect string using FreeTDS

孤人 提交于 2019-11-27 00:29:31
问题 The following works: import pyodbc pyodbc.connect('DRIVER={FreeTDS};Server=my.db.server;Database=mydb;UID=myuser;PWD=mypwd;TDS_Version=8.0;Port=1433;') The following fails: import sqlalchemy sqlalchemy.create_engine("mssql://myuser:mypwd@my.db.server:1433/mydb?driver=FreeTDS& odbc_options='TDS_Version=8.0'").connect() The error message for above is: DBAPIError: (Error) ('08001', '[08001] [unixODBC][FreeTDS][SQL Server]Unable to connect to data source (0) (SQLDriverConnectW)') None None Can

Read from the server failed when trying to connect to sql-azure from tsql

此生再无相见时 提交于 2019-11-26 21:01:19
问题 I'm trying to connect to SQL-Azure from Ubuntu 12.04. I've compiled freeTds-0.91 with openssl and libiconf tsql -H XXXXXXXX.database.windows.net -U Username -D DatabaseName -p 1433 -P Password I try connect using the above statement and I get this error: locale is "en_ZA.UTF-8" locale charset is "UTF-8" using default charset "UTF-8" Default database being set to DatabaseName Error 20004 (severity 9): Read from the server failed OS error 104, "Connection reset by peer" Error 20002 (severity 9)

SQL Server error 1934 occurs on INSERT to table with computed column PHP/PDO

前提是你 提交于 2019-11-26 18:31:54
问题 After adding a computed column to a table in SQL Server 2005 I am getting the following message on INSERT , only via PHP (using PDO) it's working fine in SQL Server Managment Studio. To ensure I had everything correct I setup a trace with SQL Server Profiler and copy/pasted the INSERT statement into SQL Server Managment Studio. It ran just fine in SSMS, but continues to fail in PHP. Error adding contact: SQLSTATE[HY000]: General error: 1934 General SQL Server error: Check messages from the

“Adaptive Server is unavailable or does not exist” error connecting to SQL Server from PHP

被刻印的时光 ゝ 提交于 2019-11-26 17:37:49
问题 I'm attempting to connect to a SQL Server 2005 DB from my Mac using unixODBC and FreeTDS as I have outlined here. However, when I try to connect in to a different DB using the same setup, I get: Connection Failed:[FreeTDS][SQL Server]Unable to connect: Adaptive Server is unavailable or does not exist. Here is my freetds.conf setup: [my_db] host = 12.34.56.789 port = 1433 tds version = 8.0 And here is my odbc.ini: [my_dsn] Driver = /opt/local/lib/libtdsodbc.so Description = My Database Trace =

Getting data with UTF-8 charset from MSSQL server using PHP FreeTDS extension

匆匆过客 提交于 2019-11-26 10:58:59
问题 I can\'t seem to get data from MSSQL encoded as UTF-8 using FreeTDS extension. Connecting: ini_set(\'mssql.charset\', \'UTF-8\'); $this->_resource = mssql_connect($config[\'servername\'], $config[\'username\'], $config[\'password\']); I have no ability to use any other extension. I\'ve tried creating ~/.freetds.conf [global] client charset = UTF-8 I\'ve tried passing parameters to php: php -d mssql.charset=\"UTF-8\" index.php Data is still not in UTF-8. php -i mssql MSSQL Support => enabled