homepage Welcome to WebmasterWorld Guest from 50.17.107.233
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe and Support WebmasterWorld
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
PHP, PDO, ODBC and MSSQL
It just seems impossible
ahmedtheking




msg:3605267
 2:03 pm on Mar 19, 2008 (gmt 0)

Days like this makes me loathe Microsoft!

I'm trying to connect to a MSSQL Server (2005 Express) through PHP. I understand that the mssql_connect() and the php_mssql.dll are old and shouldn't be used, so the next best thing is PDO's MSSQL extension. It's a pain, and that doesn't seem to work either. So then I've gone and got PDO's ODBC extension and am trying to set up a DSN for the connect, but I can't figure it out, is this right:

new PDO('odbc:database=somedb;UID=someuid;PWD=somepwd;DSN=myDSNConn');

Any ideas?

 

vincevincevince




msg:3607096
 6:48 am on Mar 21, 2008 (gmt 0)

Most people quickly migrate their database to MySQL or Postgresql and be done with it. One painful conversion for a lifetime of ease to follow!

ahmedtheking




msg:3607188
 11:30 am on Mar 21, 2008 (gmt 0)

MySQL is installed as a service, but I'm trying to connect to 2005 SQL server because an ASP.NET based web site uses that database.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved