Hello
 
I�m trying to conect PHP to SAPBD with ODBC Driver, but I got the error message:
 
Warning: SQL error: [unixODBC][SAP AG][LIBSQLOD SO]Data source name not found and no default driver specified., SQL state IM002 in SQLConnect in /var/www/html/teste.php on line 3
 
 
My file in /etc/odbc.ini
 
[saptest]
 
ServerDB = TST74
 
ServerNode = myserver.mydomain.com.br

Driver = /opt/sapdb/interfaces/odbc/lib/libsqlod.so
 
Description = My first database test
 
 
My PHP test file:
 
<?php
 
$conn = odbc_connect("saptest","dba","dba") or die ("Connection failed.");
 
echo "<br>Connection established.<br><br>";
 
$result = odbc_do($conn,"select * from users");
 
odbc_result_all($result);
 
odbc_close($conn);
?>
 
The  /opt/sapdb/interfaces/odbc/lib/libsqlod.so is in the correct place.
Any Help Please ?
 
 
Regards
 
Claudemir F. Martins

Reply via email to