Forum Moderators: coopster

Message Too Old, No Replies

Connection Strings to network.

error message

         

nanat

2:26 am on Oct 28, 2009 (gmt 0)

10+ Year Member



it seem my connection string doesnt work?

$connect = mssql_connect("192.170.xx.xx","xx","xx") or die(mssql_error());
$test = mssql_select_db("xx", $connect) or die (mssql_error());

[edited by: eelixduppy at 3:04 am (utc) on Oct. 28, 2009]
[edit reason] removed specifics [/edit]

eelixduppy

3:04 am on Oct 28, 2009 (gmt 0)



Check your error log. Are you getting anything in there about this?

nanat

3:10 am on Oct 28, 2009 (gmt 0)

10+ Year Member



tnx eelixduppy but i solve it ^^..

$connect = "Provider=SQLOLEDB.1; Data Source=192.xx.xx.xx; NetworkLibrary=DBMSSOCN; Initial Catalog=#*$!;uid=xx;pwd=#*$!;";

samplephpcodes

6:48 am on Oct 28, 2009 (gmt 0)



I think the problem is caused due to the msssql remorte connection is not enabled or u does not give the privileged to the user to connect from other host.
so

1. check the remote connecton.
2. use the grant priviage command in mysql to grand to all ip address to connect using "%" in place of the ip address

visit <snip>

[edited by: dreamcatcher at 7:04 am (utc) on Oct. 28, 2009]
[edit reason] No self promotion. See TOS. [/edit]