Re: Supplied argument is not valid MS SQL-Link resource

From: Date: Mon, 16 Apr 2001 04:21:52 +0000
Subject: Re: Supplied argument is not valid MS SQL-Link resource
Groups: php.windows 
Request: Send a blank email to php-windows+get-6756@lists.php.net to get a copy of this message
mssql_select_db returns true or false and not a link resource. You should change the code to: $Conn=mssql_connect('192.168.1.20','username','password'); if (mssql_select_db('My_Database',$Conn)) { $QueryString="select id, name from my_table"; $Test=mssql_query($QueryString, $Conn); .... } - Frank > Does anybody know how to fix this error? "Supplied argument is not valid MS > SQL-Link resource" I am running: > > NT4 > MSSQL7.0 > IIS4 > PHP 4.0.4pl1 > > I've been running php3 for some time now without any problems but want to > upgrade to 4. This error seems to be occuring at the mssql_query() > function. > > $Conn=mssql_connect('192.168.1.20','username','password'); > $ThisConnect=mssql_select_db('My_Database',$Conn); > $QueryString="select id, name from my_table"; > $Test=mssql_query($QueryString, $ThisConnect); > > Please help! Thanks. > Dave > > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > For additional commands, e-mail: php-windows-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > >

« previous php.windows (#6756) next »