freetds

SQL Server 2005 Stored Procedures in PHP with TDS Version 8.0 don't work (7.0 works well)

I'm running a PHP web app running on Ubuntu 8.04 which is interfacing with SQL Server 2005. I use FreeTDS to connect to MSSQL2005 with the following lines in my freetds.conf [MYDB] host = 192.168.1.11 port = 1433 tds version = 7.0 client charset = UTF-8 This works perfectly however if I switch to tds version = 8.0 (whi...

Best practices for doing accounting in Python

I am writing a web2py application that requires summing dollar amounts without losing precision. I realize I need to use Decimals for this, but I've found myself having to wrap every single number I get from the database with: Decimal(str(myval)) Before I go crazy adding that to all of my code, is there a better way? I'm new to Pytho...

FreeTDS translating MS SQL money type to python float, not Decimal

I am connecting to an MS SQL Server db from Python in Linux. I am connecting via pyodbc using the FreeTDS driver. When I return a money field from MSSQL it comes through as a float, rather than a Python Decimal. The problem is with FreeTDS. If I run the exact same Python code from Windows (where I do not need to use FreeTDS), pyodbc ...

Why is FreeTDS not reading its configuration file when run through unixODBC?

I'm trying to use FreeTDS's ODBC driver to access a MS SQL Server 2005 instance from a Linux application. When I run tsql on the command line, it will read /etc/freetds.conf and $HOME/.freetds.conf and pull in the options I want to set (confirmed with strace watching open/access calls). However when I use FreeTDS via unixODBC (which is...

Unable to load driver 'ODBC'

Trying to load ODBC in my Rails app (I'm on Linux, FreeBSD 7.3-STABLE using rb-odbc, unixODBC, and FreeTDS to connect to MSSql) but I'm getting this error: Trace can be found here: http://gist.github.com/547759 Anyone have any glaring ideas? Thanks! ...

TDS incoming tabular data stream is incorrect. Data Type 0xFF is unknown

Hello all, I'm using FreeTDS driver for connecting to MSSQL server. I'm getting this error when trying to insert a new row into one of the tables. Can't insert new ABC::XYZ : DBD::FreeTDS::st execute failed: Server message number=8009 severity=16 state=1 line=1 server=SERVERNAME text=The incoming tabular data stream (TDS) remote proced...

PHP MS SQL Unix Driver - Microsoft or FreeTDS

I am running a LAMP server but now need to connect to MS SQL (client request). I have heard Microsoft has a driver, but can't verify if Does anyone know if the Microsoft driver is available for Unix? If not, should I just stick with FreeTDS? This appears to be recommended by PHP, however install documentation seems lacking. Any directi...

Stop Zend_Db from quoting Sybase BIT datatype field values

I'm using Pdo_Mssql adapter against a Sybase database and working around issues encountered. One pesky issue remaining is Zend_Db's instance on quoting BIT field values. When running the following for an insert: $row = $this->createRow(); ... $row->MyBitField = $data['MyBitField']; ... $row->save(); FreeTDS log output shows: dbutil.c:...

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

Hi, 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 forced to close cursor on single result statements (with PDOStatment::closeCursor) to av...

PDO FreeTDS error

I have just upgraded my server from php 5.2 to 5.3.3 and I am having a weird error in PDO (with DBLIB). I am connecting to an SQL Server 2005. I am having The error appears in any statement that prefixes a parameter with the "N" letter (to tell SQL Server that it's a unicode string). The query looks like this: INSERT INTO IPs (IP, Pos...

unixODBC issue on a Django site on Linux that goes away on refresh.

I have a question about Django, unixODBC, FreeTDS, Apache2, mod_wsgi, that is somewhat similar to this question asked before on SO. I have a Django website built to run on the latest Django, that is, 1.2.3. It uses managed models for the most part, in that, save for the session information, nothing is written to the DB by Django, only r...

Why is there a "no such file or directory" error when the .so file does exist?

I'm trying to connect from Ruby 1.8.7 on RHEL 5 to MS SQL Server. I'm using FreeTDS and the tiny_tds RubyGem. I got it working fine on OS X. On Linux I installed FreeTDS and confirmed that it can connect to SQL Server from the command line no problem. And gem install tiny_tds went fine. However, when I deploy to Linux and try to open ...