Connection');$conn-Open("DRIVER=; DBQ=$db");// Driver do Microsoft Access (*.mdb)// must be the name in your odbc drivers, the one you get// from the Data Sources (ODBC).// In this case, I'm in Mexico but the driver name is in portuguese, thanks Microsoft.$sql = 'SELECT username FROM tbl Usuarios';$res = $conn- [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified If you keep running into this on the 64 bit versions of windows, ie server 2008, and none of the other solutions helped.
In a 64 bit windows server operating system, there are TWO odbc managers.
I couldn't understand what was going on and after a bit of research I found out that with My SQL they recommended using mysql_pconnect() for INSERT queries. If using Openlink to connect to a Microsoft Access database, you will most likely fine tha odbd_connect() works fine, but discover that ANY query will produce odd results; with SELECT queries failing with "[Open Link][ODBC][Driver]Driver not capable, SQL state S1C00 in SQLExec Direct in on line xx" and INSERT / DELETE queries warning "No tuples available at this result index". This had me stumped for quite some time; because it was the odbc_exec() which was seemingly at fault...
Make sure that the the folder your database resides in is shared, otherwise you will get the following type of message: Current Recordset does not support updating.
This may be a limitation of the provider, or of the selected locktype.' and you will spend 2 days (as I did) looking for the right combination of settings to write the record properly.
And this is for ANY application, name it PHP, Coldfusion, whatever2.
You cannot make a system DSN with a UNC (\\Server\resource), so you must map the drive Cute isn't it? I quit on ODBC and went via ADO, this is the code that works:=== CODE ===$db = '\\\\server\\resource\\db.mdb';$conn = new COM('ADODB.
It worked after we compiled with --ibm-db2= option, but it was unbelievable slow.