Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Not allowed to read Access-DB

flomiflomi Member Posts: 15

I want to read data from an ODBC-Source (Access-File) with PHP.
I get the follwing error: "SQL state S1000 in SQLConnect"
The database is located within a directory in the LAN with access restriction.

I can open and edit the database over Windows Explorer, but PHP seems to have not enough rights to access this databse in this directory.
After copying the file to another directory the PHP-Site works.

How can I make PHP able zu access this restricted directory?

Thanks a lot!


  • treshrtreshr Member Posts: 326
    Could you please tell something more. What did you configure for your dsn, show some code.
    There a few solutions for this problem and I'd like to give the right one, but that only possible if you give some more information.


  • flomiflomi Member Posts: 15

    Here is some code:
    $id = odbc_connect("Gleitzeit","","");
    $sql = "SELECT * FROM Personal_local where name='$name' and PNR=$pnr";$result = odbc_exec($id,$sql);
    while (odbc_fetch_row($result))
    echo "Test";

    There is no Password defined in the DSN.
    After copying the Database into another network-directory the whole programme works fine.
    Only in a restricted network-directory I get the Error Message.
    I am able to change and delete files in this directory with Windows-Explorer.

    Thanks a lot for your help!

Sign In or Register to comment.