Hello.. If I'm not wrong, it should be : "mysql_connect" not "mssql_connect" unless you've defined a function somewhere... ----- Original Message ----- From: Jason Wong To: [EMAIL PROTECTED] Sent: Thursday, May 09, 2002 3:44 p Subject: Re: [PHP-DB] Getting error using mssql_next_result
On Thursday 09 May 2002 10:26, Jim Wentz wrote: > In a phpfile, I am using the following: > > $link = mssql_connect($dbservername, $dbusername, $dbpassword) or > DIE("DATABASE FAILED TO RESPOND."); > mssql_select_db($dbserverdbnameacct) or DIE("Table unavailable"); > > $sql = "insert into test (descrip) values ('another test record') select > @@identity"; > > $result = mssql_query($sql, $link); > > $i = mssql_next_result($result); > > Inspection of the table test proves that the first of the two sql > statements in $sql is functioning. However, I constantly get the following > error: "Warning: Supplied argument is not a valid MS SQL-result resource in > C:\Inetpub\wwwroot\VisionCall\SubmitLoginRequest.php on line 11" > > Any ideas? Any help is greatly appreciated! Add some error checking? 1) Echo $sql to see what it holds 2) Use mssql_get_last_message()? -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Hanlon's Razor: Never attribute to malice that which is adequately explained by stupidity. */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php