Jump to content


Photo

PHP 5 / XP /IIS 5.1 /MS SQL


  • Please log in to reply
1 reply to this topic

#1 ommedia

ommedia
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 29 September 2005 - 05:19 PM

I have PHP installed on IIS on an XP local server. The MS SQL server is on another box, and is connectable from other applications including .NET.

I can't seem to get my connection to work:

CODE:
$cur_server = 'DNS_SERV_NAME';
$cur_user = 'sa';
$cur_pw = '';

$connection = mssql_connect($cur_server, $cur_user, $cur_pw)
or die("Could not connect: ");

$dbname = 'db_name';
$db = mssql_select_db($dbname , $connection)
or die("Invalid Select: ");

$result = mssql_query("SELECT Description FROM Powers WHERE Valid_Flag = 'Y' ORDER BY Description",$connection)
or die("Invalid query: ");


ERROR:
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: DNS_SERV_NAME in......


Q1: Any suggestions / references ?

Q2: Additionally, with MySQL I've used . mysql_error() in my die(). Is there an equivelant or alternative error specifics function that can be used with mssql functions?

Thanks,
Tim


#2 Munchen

Munchen
  • Members
  • PipPip
  • Member
  • 12 posts

Posted 26 October 2005 - 06:42 AM

How did You install Your SQL server ? As named instance or default ?
-Munchen
Denmark




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users