Trying to connect to Datafile using ODBC and PHP, error when datafile on network computer

Jim Creak jim at jacsoft.co.nz
Tue Apr 9 22:55:47 EDT 2013


Hi All,

We're wanting to create some html reports for clients for easy viewing of data within their database so that they don't have to do a full log into Omnis to get some basic information. We've been working with php and odbc and things are working without any issues on our testing environment, which is all on the same computer.

We then moved to testing it more, this time by placing the datafile onto a server, and linking the odbc driver to that datafile. It dies with:

	Warning: odbc_connect() [function.odbc-connect]: SQL error: Unable to read disk (bad disk), SQL state 08001 in SQLConnect in C:\xampp\htdocs\jP\includes\database.php on line 22

The ODBC link works fine with Excel we can look at and read all the records as needed.
The datafile on the server is a direct copy of the datafile on the local computer, same user name and passwords.

Line 22 in the php file is 

	$odbc_conn =  odbc_connect($name_odbc, $odbc_user, $odbc_pass)

The user name and password are correct, we've also tried leaving them blank, which works on the local data, but neither work with the remote data.

The server is sitting on the same network, and we have tried two different servers, with the same result for both.

Any hints would be appreciated.

Thanks
Jim

JACSoft Programming Ltd.






More information about the omnisdev-en mailing list