I have a php file that im using odbc to get data from MSSQL 2008. I got everything working; however, when I try to run another query after the first one I get this error:
Warning: odbc_exec(): SQL error: [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt, SQL state S1000 in SQLExecDirect in C:\wamp\www\3.php on line 7
if ($conn)
{
//there will be no return output for this one just want to run it to refresh the sales data
$query1="my query code here";
$result=odbc_exec($conn, $query1);
$query2="my other query code here";
$result=odbc_exec($conn, $query2);
}
odbc_free_resultafter using the first result set, instead of closing the connection. - Laurence