I have this code, the connection always works well, but when executing odbc_exec() its always give me a "error" for all sql commands.I am connecting with DBA privileges. In my php page i always get a warning "Warning: odbc_exec()" but no reason is specified.
$c = odbc_connect(service_name, user, password);
if (!$c)echo 'Failed to connect';
$sql= "SELECT * FROM Medics";
$result = odbc_exec($c,$sql) or die("error");