php - Doctrine2: DBAL connection to Sql-Server -


connecting mssql using doctrine2 on unix

im developing project uses doctrine2 php on ubuntu server (x64). it's required fetch data mssql-server running externally.

problem

doctrine2 doesn't support pdo_dblib driver, neither there's support sqlsrv on unix-like machines (sqlsrv windows only). being given, seems doctrine doesn't have built-in support mssql-servers on unix-machines.

solutions

these solutions tried without success.

1. write own wrapper pdo_dblib , integrate in doctrine's dbal

i couldn't figure out how write own driver, platform , schema doctrines dbal neither found usefull in docs or per google.

actual question

is there kind of support mssql-servers doctrine 2 without using symfony or other third-party code ?

your original solution not hard achieve. i've run issue trying connect sql server using odbc, 1 option linux hosts, , change needed in this file.

if update function , use valid odbc connection string instead, work fine. of course doctrine folks didn't make easy making function private, you'll either have resort editing library or copy/pasting entire sql server driver code.

that said, sql server support odbc poor. example, i've run issue exceptions thrown if use bound parameters inside subquery. though works fine microsoft's official driver based on odbc. go figure. if possible, copy data more linux friendly database , work there.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -