CodeIgniter MSSQL connection

For x86 win download http://www.microsoft.com/en-us/download/details.aspx?id=20098 for using with: $db[‘default’][‘dbdriver’] = ‘sqlsrv’; use the php_sqlsrv_XX_ts_vcX.dll in php.ini extension if your webserver and your database server are not on same server with your app, install this: http://go.microsoft.com/fwlink/?LinkID=188400&clcid=0x409 and for linux as webserver: $db[‘default’][‘dbdriver’] = ‘mssql’; download & install = php5-sybase + freetds <br/>edit /usr/local/etc/freetds.conf <br/>create pdo_dblib.so & … Read more

Connecting to MS SQL Server with Windows Authentication using Python?

You can specify the connection string as one long string that uses semi-colons (;) as the argument separator. Working example: import pyodbc cnxn = pyodbc.connect(r’Driver=SQL Server;Server=.\SQLEXPRESS;Database=myDB;Trusted_Connection=yes;’) cursor = cnxn.cursor() cursor.execute(“SELECT LastName FROM myContacts”) while 1: row = cursor.fetchone() if not row: break print(row.LastName) cnxn.close() For connection strings with lots of parameters, the following will accomplish … Read more

Hand Install of 64-bit MS Access ODBC drivers when 32-bit Office is present

using the /passive switch you can install 64-bit ace drivers even if 32-bit ms office is present: http://blog.codefluententities.com/2011/01/20/microsoft-access-database-engine-2010-redistributable/ Just be warned that installing the 2010 64-bit ACE engine on a machine with 2010 32-bit Office already installed CAN lead to some wacky behavior in your already existing Office 2010.

Unable to retrieve UTF-8 accented characters from Access via PDO_ODBC

The Problem When using native PHP ODBC features (PDO_ODBC or the older odbc_ functions) and the Access ODBC driver, text is not UTF-8 encoded, even though it is stored in the Access database as Unicode characters. So, for a sample table named “Teams” Team ———————– Boston Bruins Canadiens de Montréal Федерация хоккея России the code … Read more

How to bind parameters via ODBC C#?

Odbc cannot use named parameters. This means that the command string uses placeholders for every parameter and this placeholder is a single question mark, not the parameter name. OdbcCommand.Parameters Then you need to add the parameters in the collection in the same order in which they appear in the command string OdbcCommand cmd = conn.CreateCommand(); … Read more