freetds

Cannot install pymssql on windows

空扰寡人 提交于 2019-12-05 08:34:04
i am trying to install pymssql as pip install pymssql i have windows 7 and python 3.5 (from anaconda) but i get Failed building wheel for pymssql i believe its related to freetds and python-dev . how do i install these on windows? Which packages would i need to install? this pip install worked just fine for python 2.7. If the pip does not work,is there any other way i can download and install pymssql? Jason Sperske I just went through this small bit of hell and finally got things working, here is what I ended up doing: First locate your Python directory (for me it was c:\Python35 ), then

One of the SELECT fails using unixOdbc - SQLSTATE[24000]: Invalid cursor state

[亡魂溺海] 提交于 2019-12-05 08:11:49
I am running Ubuntu 13.10 with FreeTDS and ODBC (package: php5-odbc) installed. I use tds version = 8.0, but also tried tds version = 7.2. I am using PDO and this is my DSN: $dsn = sprintf('odbc:Driver=FreeTDS;Server=%s;Port=1433;Database=%s', DB_SQL_SERVERNAME, DB_DB_NAME); I connect to MSSQL instance and perform some INSERT/SELECT queries using transactions, however I can not figure out why this query fails: SELECT id FROM tblColumns WHERE siteID = 10063 AND typeID = 1000 AND extendedTypeID = 18 AND label = 'RwThiFc85A' giving error: SQLSTATE[24000]: Invalid cursor state: 0 [FreeTDS][SQL

为Python编程三步配好Linux上的FreeTDS

一个人想着一个人 提交于 2019-12-05 03:54:48
在Linux中,如果要使用ODBC并连到MS SQLServer,我们需要为Linux操作系统安装并配置好UnixODBC模块。很多教程中的操作步骤比较复杂,我将其中关键步骤精简到三步: 本教程以刚刚安装好的Ubuntu 12.04环境为例: 第一步 ,为Linux安装ODBC模块unixodbc,并添加MSSQL的ODBC驱动程序FreeTDS: 命令:在命令行终端中输入命令: sudo apt-get install tdsodbc unixodbc 并输入系统管理员密码。 说明:tdsodbc为FreeTDS的关键包,含有MSSQL的驱动程序文件libtdsodbc.so,而unixodbc为Linux上的ODBC框架,含有关键二进制文件:libodbc.so或libodbc.so.1 第二步 ,找到libtdsodbc.so这个文件的路径。例如,如果文件路径为 /usr/lib/i386-linux-gnu/libtdsodbc.so ,修改/etc/odbcinst.ini(没有的话要在/etc/下新建这个文件),在文件中加入: [FreeTDS] Driver = /usr/lib/i386-linux-gnu/libtdsodbc.so 通常libtdsodbc.so在32位Linux上位于usr/lib/i386-linux-gnu/odbc

PHP 7.x connection with MSSQL server with MAMP

老子叫甜甜 提交于 2019-12-05 00:44:49
问题 I am trying to connect mssql server to PHP 7.0.8 through MAMP. I have tried using freetds. On some blog people are saying to use pdo_dblib.so extension but it's not working. Please guide me through the process of connection. 回答1: Follow this guide through step 3: Microsoft PHP drivers for SQL Server Find where pecl drops extensions in your local machine Copy the files pdo_sqlsrv.so and sqlsrv.so into your MAMP's PHP extension directory. Mine was located at /Applications/MAMP/bin/php/php7x.x

Failing to bundle install tiny_tds on Mac OS X 10.8 with Homebrew FreeTds

こ雲淡風輕ζ 提交于 2019-12-04 18:31:39
问题 MY QUESTION What are some surefire steps I can take to 100% get this working? I would need real instructions, not one liner answers or vague conceptual descriptions of the process. Let's get to the bottom of this. It would appear that there are conflicts somewhere and I've had subpar assistance from the gem developer on GitHub in relation to my experience with Ruby / Rails / Bundler / Homebrew so it's not completely their fault :P But I need to figure out how to get this working ASAP so here

Pypyodbc: Can't open lib 'FreeTDS' : file not found") error when trying to connect to SQL server

纵然是瞬间 提交于 2019-12-04 15:54:59
问题 I'm trying to connect to a SQL Server using Pypyodbc on Mac and I'm getting the following error: pypyodbc.DatabaseError: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'FreeTDS' : file not found") I have installed freeTDS and unixodbc brew install unixodbc brew install freetds and here is my connection String with dummy data: connection_String = "Driver=FreeTDS;Server=123.12.12.12;tds_version=7.2;Database=db_db;Uid=username:pwd=password:port=1433" 回答1: Check your /etc/odbcinst

How to connect to Azure SQL database from Django app on Linux VM

不问归期 提交于 2019-12-04 12:33:44
I searched tutorials or full explanations about using SQL Azure Database with Django application, that hosted on Linux VM. I changed database section of settings.py like this DATABASES = { 'default': { 'ENGINE': 'sql_server.pyodbc', 'NAME': 'azure_database_name', 'USER': 'user@server_name_like_wjrnvlwjrng3', 'PASSWORD': 'my_pass', 'HOST': 'server_name_like_wjrnvlwjrng3.database.windows.net', 'PORT': '1433', 'OPTIONS': { 'driver': 'FreeTDS', 'TDS_Version': '7.1', } } } I append [MyDb] host = server_name_like_wjrnvlwjrng3.database.windows.net port = 1433 tds version = 7.1 to /etc/freetds/freetds

FreeTDS - tsql connects, isql fails

感情迁移 提交于 2019-12-04 06:23:13
I'm trying to connect to a database on my host machine (windows xp, sql server 05). My guest machine is Ubuntu 10.04. I can connect and execute commands with tsql, but isql fails. Below are my config files and error messages. freetds.conf text size = 64512 [SQLEXPRESS] host = 192.168.163.1 port = 1433 tds version = 7.0 odbcinst.ini [FreeTDS] Description = TDS driver (Sybase/MS SQL) Driver = /usr/lib/odbc/libtdsodbc.so Setup = /usr/lib/odbc/libtdsS.so CPTimeout = CPReuse = FileUsage = 1 odbc.ini [SQLEXPRESS] Driver = FreeTDS Description = ODBC connection via FreeTDS Trace = No Servername = 192

FreeTDS problem connecting to SQL Server on Mac (Unexpected EOF from the server)

百般思念 提交于 2019-12-04 03:27:57
I have setup FreeTDS to connect to SQL Server database. When I try to open TSQL in terminal on Mac (lion) I get this error: locale is "en_US.UTF-8" locale charset is "UTF-8" using default charset "UTF-8" Error 20017 (severity 9): Unexpected EOF from the server OS error 36, "Operation now in progress" Error 20002 (severity 9): Adaptive Server connection failed There was a problem connecting to the server Does anybody have a clue what could be causing this? John To make this permenant I found I need to edit the freetds.conf file and set it globally in there vim /usr/local/freetds/etc/freetds

python使用pyodbc,freetds连接azure数据库

倖福魔咒の 提交于 2019-12-04 03:00:31
简介: 微软azure平台推出sqldatabase paas服务。现在使用python语言连接azure数据库的小demo。 准备环境: 1,azure sqldatebase数据库创建,参考 http://www.windowsazure.cn/starter-guide/ 第三课,创建云端的数据库, 2,创建demo表,我是使用管理工具创建,sql语句代码为: IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[demo1]') AND type in (N'U')) BEGIN CREATE TABLE [dbo].[demo1]( id [int] IDENTITY(1,1) NOT NULL, name varchar(30) not null CONSTRAINT [PK_demo] PRIMARY KEY CLUSTERED ( [id] ASC )WITH (IGNORE_DUP_KEY = OFF) ) END; GO 需要注意的事项为:sqldatabase必须有一列为聚合键,如果没有,创建表会失败,临时表没有该限制。 可以参考 http://azure.microsoft.com/en-us/documentation/articles/data