Reputation: 56
We're wanting to create some html reports for clients for easy viewing of data within their Omnis 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.
Upvotes: 1
Views: 1402
Reputation: 43
Randall casts "Resurrect" on thread:
I had this exact same problem: attempting to open an OMNIS datafile over a network connection. The solution that worked for me was to set the filename in the 32-bit ODBC DSN connection manager as the network path to the file (\SERVER\Directory\File.cf1) rather than via the drive map. Using the drive map caused this error.
Upvotes: 2