Hello! i tried that and did not work! thanks anyway.
-----Mensagem original----- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] nome de Michael W. Enviada em: terça-feira, 10 de maio de 2005 17:25 Para: Maurit Pereira Fagundes Cc: [EMAIL PROTECTED]; php-install@lists.php.net Assunto: Re: RES: [PHP-INSTALL] PHP on WIndows 2003 Web Edition Prioridade: Alta Try using $db = mssql_connect("server ip", "user", "password"). I think that it's the correct syntax. On Tue, May 10, 2005 2:07 pm, Maurit Pereira Fagundes said: > 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: php-install@lists.php.net > 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 >