Trying to connect to Datafile using ODBC and PHP, error when datafile on network computer
Jim Creak
jim at jacsoft.co.nz
Wed Apr 10 05:23:11 EDT 2013
Thanks Phil
Machine and Server are both 32bit.
Thanks
Jim
JACSoft Programming Ltd.
On 10/04/2013, at 7:30 PM, Philip Potter wrote:
> Hi Jim,
> Any chance that you only created a 64bit ODBC DSN, instead of what is probably required, a 32bit DSN?
>
> Try:
> C:\Windows\SysWOW64\odbcad32.exe
> to run the 32bit ODBC admin.
>
> The guess is that the local machine is 32bit OS, and the server 64bit.
>
> Phil.
>
>
> On 10/04/2013 03:55, Jim Creak wrote:
>> 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.
>>
>>
>>
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com
>>
>
> --
>
> P G Potter, 11 Regency Court, Mickle Trafford, Chester, UK.
>
> This message is confidential and intended for the use only of the person to whom it is addressed. If you are not the intended recipient you are strictly prohibited from reading, disseminating, copying, printing, re-transmitting or using this message or its contents in any way. Opinions, conclusions and other information expressed in this message are not given or authorised by the Company unless otherwise indicated by an authorised representative independent of this message. The Company does not accept liability for any data corruption, interception or amendment to any e-mail or the consequences thereof. Emails addressed to individuals may not necessarily be read by that person unless they are in the office.
>
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
More information about the omnisdev-en
mailing list