ADODB odbc_execute

212 views Asked by At

Just managed to connect with MS Access database but now another problem appears. I cannot select data from the database with the follwing code, because it says there is an error with the odbc_execute() function. How can this be fixed?

include( '../../lib/adodb5/adodb.inc.php');


$dbName = "database.mdb";
$db = ADONewConnection('access'); 

$dsn = "Driver={Micrsoft Access Driver(*.mdb)};Dbq=$dbName";
$db->Connect($dsn);

if(!db){
    die("Connection error!");
} else{
    echo "Connection established";
}

$sql = "Select * from Ladegut";
$result = $db->getAll($sql);

print_r($result);


EDIT: Sorry I forgot to add the Error-Message:

 Uncaught Error: Call to undefined function odbc_exec()
\lib\adodb5\drivers\adodb-odbc.inc.php on line 537
0

There are 0 answers