odbc_connect() is not working

wxdqz

New Member
Hi,

I am trying to connect to MSSql server 7 database using odbc_connect(). But I am getting "Fatal error: Call to undefined function: odbc_connect() in /usr/public/Sql_Connect.php on line 2" error.

Here is my code
<?php
$db = ODBC_Connect("AssetCenter7", "", "");
$res = ODBC_Exec($db, "SELECT fieldname FROM table WHERE conditions");
while (ODBC_Fetch_Row($res)) {
echo "<TR><TD>".ODBC_Result($res, 'fieldname')."</TD></TR>";
}
ODBC_Free_Result($res);
?>

"AssetCenter7" is the System DSN. Please tell me where I am making a mistake.

Thanks in advance.

Shankar
 
Back
Top