| | |
How to connect remote mssql
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Sep 2009
Posts: 11
Reputation:
Solved Threads: 0
danni web has been a great help to me i want just one more help
i am able to connect to MSSQL present in my localhost using wamp
but i am unable to connect to my MSSQL running in a pc with ip 123.xxx.xxx.xxx
can u guide me on how to connect to it..!
thanx in advance
i am able to connect to MSSQL present in my localhost using wamp
but i am unable to connect to my MSSQL running in a pc with ip 123.xxx.xxx.xxx
can u guide me on how to connect to it..!
thanx in advance
Last edited by daneuchar; Oct 27th, 2009 at 8:56 am. Reason: topic header miss read
•
•
Join Date: Sep 2009
Posts: 557
Reputation:
Solved Threads: 64
0
#2 Oct 28th, 2009
do your sql manager supports ssh
"The discipline of writing something down is the first step towards making it happen."
follow me on twitter
follow me on twitter
•
•
Join Date: Sep 2009
Posts: 557
Reputation:
Solved Threads: 64
0
#4 Oct 29th, 2009
oops , you can simply connect it using the connect function like below -
you must have understood that, in the mssql_connect function, you need to provide the server's name at first parameter and so on.
put that ip there and it should work.
PHP Syntax (Toggle Plain Text)
$con = mssql_connect($server_name,$username,$password); $db_select = mssql_select_db($database_name);
put that ip there and it should work.
"The discipline of writing something down is the first step towards making it happen."
follow me on twitter
follow me on twitter
0
#5 Oct 29th, 2009
You may Use the Belwo Specified Code:
EDIT: Sorry Code Edited for Some Error.
PHP Syntax (Toggle Plain Text)
$hostname = "123.xxx.xxx.xxx"; // usually is localhost, but if not sure, check with your hosting company, if you are with webune leave as localhost $db_user = "username"; // change to your database password $db_password = "password"; // change to your database password $database = "database_name"; // provide your database name # STOP HERE #################################################################### # THIS CODE IS USED TO CONNECT TO THE MSSQL DATABASE $db = mssql_connect($hostname, $db_user, $db_password); mssql_select_db($database,$db); //Database Connect
EDIT: Sorry Code Edited for Some Error.
Last edited by hemgoyal_1990; Oct 29th, 2009 at 4:19 am.
http://www.kuchamancity.com
Hem Web Solution..
Behind Every Successful Man, There is an Untold Pain in His Heart.
Hem Web Solution..
Behind Every Successful Man, There is an Untold Pain in His Heart.
•
•
Join Date: Sep 2009
Posts: 557
Reputation:
Solved Threads: 64
0
#6 Oct 29th, 2009
he wants to connect to the microsoft's SQL server and not MySQL
"The discipline of writing something down is the first step towards making it happen."
follow me on twitter
follow me on twitter
0
#7 Oct 29th, 2009
Sorry Friend.
am Edit my Code.
Thanx for Your Suggestion.
am Edit my Code.
Thanx for Your Suggestion.
http://www.kuchamancity.com
Hem Web Solution..
Behind Every Successful Man, There is an Untold Pain in His Heart.
Hem Web Solution..
Behind Every Successful Man, There is an Untold Pain in His Heart.
![]() |
Similar Threads
- WinSock connect() problem. Client thinks it is connected even when Server is down (C++)
- how to connect netbeans 5.5 mobile application in ms access (Computer Science)
- VB: Connect to Access database via ODBC datasource name (Visual Basic 4 / 5 / 6)
- connect to text file database (Visual Basic 4 / 5 / 6)
- Cannot Connect to, Linksys' Web Based Utility, I need help (Networking Hardware Configuration)
- connect to password protected access db (Visual Basic 4 / 5 / 6)
- Can't connect to internet (Networking Hardware Configuration)
Other Threads in the PHP Forum
- Previous Thread: Prevent a user from viewing the info
- Next Thread: Is this a PHP installation problem??
Views: 351 | Replies: 8
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code codingproblem cron curl database date directory display download dynamic echo email error file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla jquery limit link login loop mail memmory menu methods mlm mod_rewrite multiple mysql oop parse paypal pdf php problem query radio random recursion regex remote script search select server sessions sms soap source space speed sql static structure syntax system table tutorial up-to-date update updates upload url validation validator variable video web wordpress xml youtube






