coonect ot MSSQL 7.0
Moderator: General Moderators
coonect ot MSSQL 7.0
I figure out from my coding style using ms_sql_connect fail to connect to server. I supplied the ip of the server. What am I missing?
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Asking Smart Questions
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:2.1. When asking a question, be as specific as you can be, provide the relevant code and any other information that is helpful in a concise and coherent manner. If you are not sure how to do that, read these guidelines.
Code: Select all
$myServer = "202.157.***.***";
$myUser = "vmadmin1";
$myPass = "vmsql15062002111";
$s = mssql_connect($myServer, $myUser, $myPass) or die("Unable to connect to server: $myServer");
$myDB = "vmtmx";
$d = mssql_select_db($myDB, $s) or die("Unable to connect to database: $myDB");Code: Select all
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: 202.***.***.220 in C:\xampp\htdocs\jobvm2\js_form.php on line 88- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Have you looked at what mssql_get_last_message() returns?
I already tested the get last message. But it didn't work. The message was: unable to connect to 202.***.**.***. I already set up the MS SQL network utility to 1433. And telnet to it and the reply is success. I also checked my php info and everything was setup accordingly. Do you have any idea waht's cause this?
Ok...it's my mistake for placing the IP and port number like this
202.XX.XXX.X: 1433.
it should be 202.XX.XXX.X, 1433....
More details on: http://amin2u.blogspot.com/2007/07/call ... nnect.html
202.XX.XXX.X: 1433.
it should be 202.XX.XXX.X, 1433....
More details on: http://amin2u.blogspot.com/2007/07/call ... nnect.html