ODBC with php

ClearSys

New Member
I think this is almost connected but I get an error.

Can someone help me past this point?

here is my code.

<code>
<?php

echo "Hello world!<br><br>";


$connect = odbc_connect("dsnname", "username", "password", SQL_CUR_USE_ODBC);

$query = "select * from PUB.company";

$result = odbc_exec($connect, $query);

while (odbc_fetch_row($result)) {
$company = odbc_result($result, "name");


$list .= "$company<br>";


}//end while each.


echo "$list";


?>

</code>




error
Warning: odbc_exec() [function.odbc-exec]: SQL error: [DataDirect][ODBC Progress OpenEdge Wire Protocol driver][OPENEDGE]Access denied (Authorization failed) (7512), SQL state S1000 in SQLExecDirect in C:\Apache\xampp\htdocs\index.php on line 10
 
Either SQL security is not setup on the database or you did not provide valid user credentials (username/password) - the error message from the driver says it all ...

Heavy Regards, RealHeavyDude.
 
Back
Top