Questions tagged [freetds]

FreeTDS is a set of libraries for Unix and Linux that allows your programs to natively talk to Microsoft SQL Server and Sybase databases.

Website: http://freetds.schemamania.org/

658 questions
6
votes
3 answers

Using typed bound parameters with PHP PDO-ODBC, unixODBC and FreeTDS

I'm using the following setup to access a MS-SQL database from a PHP application RedHat Enterprise Linux 5 PHP 5.2.14 with PDO and PDO_ODBC unixODBC 2.2.11 FreeTDS 0.82.1.dev.20100810 Unparametrized queries work fine. The only issue is being…
Pierre Buyle
  • 4,883
  • 2
  • 32
  • 31
6
votes
2 answers

Error in pyodbc: 'pyodbc.Cursor' object has no attribute 'commit'

I want to connect to SQL SERVER database from Python with pyodbc and freetds. My connection is OK. My code: class GetSystems(Resource): def get(self): try: cur = Connection.conn.cursor() cur.execute( "SELECT…
Oscar Ordoñez Mego
  • 121
  • 1
  • 1
  • 11
6
votes
1 answer

PHP PDO dblib (mssql) with persistent connections not working

Following online examples and the documentation for PDO I have this one line for creating a PDO object using persistent connections: $p = new PDO('dblib:host=SOMEHOSTNAME;dbname=SOMEDB',$user,$password,[PDO::ATTR_PERSISTENT=>true]); Example on…
Sean256
  • 2,849
  • 4
  • 30
  • 39
6
votes
3 answers

Python - Linux - Connecting to MS SQL with Windows Credentials - FreeTDS+UnixODBC + pyodbc or pymssql

There doesn't seem to be any great instructions for setting this up. Does anyone have any good instructions? I am a linux noob so be gentle. I did see another post that is similar, but no real answer. I have a couple of problems. FreeTDS…
Keith P
  • 2,150
  • 1
  • 18
  • 15
6
votes
1 answer

PDO dblib over freetds resets fetch of query on sql server 2000 if another query is issued inside a fetch loop

Ok, so we've got a new server with Debian Wheezy 32BIT PHP 5.5.18 FreeTDS 0.91 This PHP app needs to talk to an old SQL server 2000 server. We used the old code from our previous server (PHP 5.2 and older FreeTDS - can't get the version). We…
S.Magnaschi
  • 787
  • 5
  • 12
6
votes
2 answers

freetds and pyodbc failing to connect

I'm currently working on setting up a connection from a Linux box to a Microsoft SQL server. I have installed FreeTDS and pyodbc on the Linux box. I have set up the following files: /etc/freetds/freetds.conf [sqlserver] host =
dbcoder
  • 71
  • 1
  • 3
6
votes
0 answers

Connect to MS SQL database using freetds, unixodbc and python

I'm running Ubuntu 12.04 on a 32-bit computer, and I want to connect to my MS SQL database using freetds, unixodbc and python, but I'm getting an error: >>> import pyodbc >>> conn = pyodbc.connect('DSN=TS;UID=myusername;PWD=mypassword') Traceback…
Andrew
  • 1,000
  • 1
  • 17
  • 33
6
votes
4 answers

ODBC query on MS SQL Server returning first 255 characters only in PHP PDO (FreeTDS)

I'm currently trying to pull some data from a SQL Server database view that we have restricted access to from our Linux web server. We don't need to edit the data just display it in a webpage. It all looks fine until we try to output and only get…
Del
  • 306
  • 1
  • 4
  • 12
6
votes
3 answers

Connecting to MS SQL database with PHP: Data source name not found, and no default driver specified

I'm stuck with this problem for a while and I just can't get any further, I did a lot of searches but nothing works... I'm trying to connect to a Microsoft SQL Database with php using odbc. Everything is set up, as follows (the values between "" are…
peird
  • 71
  • 1
  • 1
  • 7
6
votes
1 answer

Error 20009 (severity 9):Unable to connect: Adaptive Server is unavailable or does not exist OS error 111, "Connection refused"

while trying to connect to remort mssql server by command tsql -S SQLEXPRESS -U sa passwod :sa it throws error as Error 20009 (severity 9):Unable to connect: Adaptive Server is unavailable or does not exist OS error 111, "Connection…
Vishnu
  • 141
  • 2
  • 2
  • 5
6
votes
2 answers

pdo-odbc doesn't work whit bind values, nvarchar and text are incompatible in the equal to operator

There is a column url(nvarchar(200), not null) setAttribute(PDO::ATTR_PERSISTENT, false); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); // plain sql query: WORKS FINE! $sth =…
Luistar15
  • 1,699
  • 3
  • 14
  • 16
6
votes
3 answers

How do I configure pyodbc to correctly accept strings from SQL Server using freeTDS and unixODBC?

I can not get a valid string from an MSSQL server into python. I believe there is an encoding mismatch somewhere. I believe it is between the ODBC layer and python because I am able to get readable results in tsql and isql. What character encoding…
MatthewD
  • 309
  • 2
  • 8
6
votes
3 answers

freeTDS bash: Executing sql queries in Microsoft SQL server

I am able to connect to a Microsoft SQL Server 2008 instance via a Mint Linux VM using freeTSD and command line to execute sql statements on it. Now I want automate this in a bash script. I am able to successfully login in my bash script: TDSVER=8.0…
user1684462
6
votes
1 answer

Install freetds on Heroku

I'm looking for a step by step guide, how to install freetds on Heroku. I need to access Sql Server from ruby script, and unfortunately Cedar doesn't support tinytds gem out of box. I've read whatever information there is available on internet,…
Jack Juiceson
  • 830
  • 4
  • 12
  • 24
6
votes
2 answers

Connecting to SQL-Azure with freeTDS error: Read from the server failed

I'm trying to a SQl-Azure database from ubuntu 12.04. I've downloaded freeTDS-0.91 and compiled it with openssl and libiconf (for use with the tiny_tds gem). When I try connect to the sql-azure db I get the following…
Martinffx
  • 2,426
  • 4
  • 33
  • 60