Hi.
I receive the following message --> Warning: mssql_connect(): Unable to connect
to server: servername
the php code to connect to the sql server is:
(!$db=mssql_connect("servername","user","password")
---------------------------------------------------------------
i already tried the following sintax, but did not work:
mssql_connect("SERVER\INSTANCE","UID","PWD");
ou
mssql_connect("SERVER\\INSTANCE","UID","PWD");
ou
mssql_connect("SERVER:PORT","UID","PWD");
ou
mssql_connect("SERVER,PORT","UID","PWD");
ou
mssql_connect("SERVER","UID","PWD");
---------------------------------------------------------------
so i tried the following sintax: i created an OBDC before and the connection
with sql server worked.
<?
$dsn="odbc name";
$username="username";
$password="password";
$sqlconnect=odbc_connect($dsn,$username,$password) or die ( 'Can not connect to
server' )
?>
i want to understand why the first method did not work, please some help!
Thanks in advance!
-----Mensagem original-----
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Enviada em: ter�a-feira, 10 de maio de 2005 14:21
Para: Maurit Pereira Fagundes
Cc: [email protected]
Assunto: Re: [PHP-INSTALL] PHP on WIndows 2003 Web Edition
On 5/9/05, Maurit Pereira Fagundes <[EMAIL PROTECTED]> wrote:
> I set up php with windows 2003 web edition. The php instalation worked. but i
> cant get connected to the sql server database.
> i configured network client utility, odbc...etc.
>
> the configuration i have in windows 2003 web edition is the same i had with
> windows 2000 server and worked.
>
> could someone help me?
/*
I could help, except that I have no idea what is wrong! I need error
messages, code, configuration files and the like if they are relavent
in order to help you out! Post this and we can troubleshoot these
things a lot better!
*/
--
[EMAIL PROTECTED]
PHP rocks!
"Knowledge is Power. Power Corrupts. Go to school, become evil"
Disclaimer: Any disclaimer attached to this message may be ignored.
However, I must say that the ENTIRE contents of this message are
subject to other's criticism, corrections, and speculations.
This message is Certified Virus Free