I'm trying to use the CI way of connecting to databases. It seems to work with mysql databases using mysqi. However, I get an error 1064 when using it to connect to SQL. I have set the connection up as sqlsrv driver. If I build the query using the php sqlsrv functions it works fine. Is there a trick to get this to work. It worked fine with the older version of PHP 5.x with the mssql driver.