Welcome Guest, Not a member yet? Register   Sign In
How to Connect to MsSQL
#1

[eluser]Obasi George[/eluser]
Good Day folks,

I have recently started to port some applications over to CI, but there seems to be a stumbling block at the moment.

Q: How do you connect to a MsSQL server that is not on the standard port?

I have already added the port to the database array (does not work), and don't want to use an ODBC connection.

Any ideas will be welcomed.
#2

[eluser]Pygon[/eluser]
You'll set it as part of the hostname (the mssql driver doesn't handle port as it should from the looks of it).

['hostname'] = "127.0.0.1:1234" for example, would connect to port "1234". ":port"
#3

[eluser]Obasi George[/eluser]
I tried that one first.

No dice. Then I checked the PHP configuration and it works just fine with ADOdb.

Will have to do something else I suppose.
#4

[eluser]Pygon[/eluser]
Silly question -- you set PHP up to use MsSQL right (client tools on windows/freetds on linux)? We had this problem when we migrated to mssql originally.
#5

[eluser]Obasi George[/eluser]
Most definitely a silly question, but one non the less.

Yes it has been setup, and works great with the ADOdb library.
#6

[eluser]Obasi George[/eluser]
I gave up and did the odbc connect, it works just fine.

Will work in the other connection over the weekend. Thanks much guys for your assistance.
#7

[eluser]llbbl[/eluser]
why use mssql? mysql is so much better!




Theme © iAndrew 2016 - Forum software by © MyBB