note 118022 added to function.odbc-connect
| From: | Anonymous | Date: | Sat, 19 Sep 2015 18:33:47 +0000 |
| Subject: | note 118022 added to function.odbc-connect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-203817@lists.php.net to get a copy of this message | ||
how to solve Error SQL state S1009 connecting to an access database in a network with odbc
1 - if you dont have access installed in your computer, you will need the access driver for odbc
conection...install with mdactypex (just for 32 bits)... or AccessDatabaseEngine_X64.exe for 64bits
2 - give needed rights to a windows user profile to run as a service: Control panel, Administrative
tools, in the left treeview panel, select Local Security Policies, User Rights Assignment, and in
the right panel find and select 'Logon as a service', right button click and
properties-> Search and add the user User in your computer you want to Apache use to login at
service start
3 - Go to Windows Services admin, select Apache, edit properties, select login tab, and set the
previuos user you use (write his windows login password)
4- Use php code like this:
$user="your_db_user";
$password="your_db_password";
// Conexion Access con ODBC
// Important: (4 initial slashes!) \\\\network_path\dir_name\...
$mdbFilename='\\\\servidor\data\AccessBD.mdb';
$conn_access = odbc_connect("Driver={Microsoft Access Driver (*.mdb)};Dbq=$mdbFilename",
$user, $password);
----
Server IP: 72.52.91.14
Probable Submitter: 79.151.241.101
----
Manual Page -- http://php.net/manual/en/function.odbc-connect.php
Edit -- https://master.php.net/note/edit/118022
Del: integrated -- https://master.php.net/note/delete/118022/integrated
Del: useless -- https://master.php.net/note/delete/118022/useless
Del: bad code -- https://master.php.net/note/delete/118022/bad+code
Del: spam -- https://master.php.net/note/delete/118022/spam
Del: non-english -- https://master.php.net/note/delete/118022/non-english
Del: in docs -- https://master.php.net/note/delete/118022/in+docs
Del: other reasons-- https://master.php.net/note/delete/118022
Reject -- https://master.php.net/note/reject/118022
Search -- https://master.php.net/manage/user-notes.php