|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2014-12-09 16:24 UTC] rajendradewani at gmail dot com
Description: ------------ HI, I have a ms-access file which has linked table. The linked table is connected to a ODBC source (e.g MS-SQL or 3rd Party ODBC Driver). WebPage(php) Apache, connecting to a ODBC DSN of MS-Access, MS-Access is having linked tables. Linked tables as from another ODBC source. On the PHP Page, When I am trying to connect the ms-access odbc dsn , I am able to connect. But when I query any of the linked tables, PHP is not able to query and is failing. Does php has capabilities to read/write to linked tables in ms-access file. Or it is issue with MS-Access Or is it I am missing something. Microsoft says, its an issue of PHP https://social.msdn.microsoft.com/Forums/office/en-US/04d10d5d-698b-404b-8eef-7b16d83ac99b/does-msaccesss-linked-tables-are-supports-on-php?forum=accessdev Regards Rajendra Dewani PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 18 00:00:01 2025 UTC |
Create a ms-access file. Then create a linked table ( you can create linked table of any source, I have used QODBC driver, but it does not matter). then create a System DSN which points to ms-access file. then i am using below code, i did debug and found its able to connect but when querying the linked table it fails, when I query a physical/local table "localtable" which is on the ms-access file, the code works. $oConnect = odbc_connect("myAccessDSN", "", ""); #Set the SQL Statement $sSQL = "SELECT TOP 50 ListID, FullName, CompanyName FROM Customer"; #$sSQL = "SELECT TOP 50 ListID, FullName, CompanyName FROM localtable"; #Perform the query $oResult = odbc_exec($oConnect, $sSQL);Hi, thanks for the update. And the holidays are passe :) I've tried your snippet, took one from before: oConnect = odbc_connect("QB Access", "", ""); $sSQL = "SELECT TOP 50 ListID, FullName, CompanyName FROM Customer"; $oResult = odbc_exec($oConnect, $sSQL); Unfortunately the issue is still blended by something else, namely here's the error message i see: Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access Driver] ODBC--connection to 'QuickBooks Data QRemote' failed., SQL state S1000 in SQLExecDirect in C:\php-sdk\php56\vc11\x64\php-src\68578\other.php on line 10 I see from your screenshot that you have several other data sources which probably communicate with each other. But I see anyway that the .accdb file you've supplied is way too complicated. As with the current test data the actual issue isn't reproduceable, I would like to ask you to simplify the DB file. Please note - we don't need your whole db file(s), it would be much better you to create a completely synthetic case. Like - one normal table, one linked table, some lines of the data. Btw. maybe that warning above already reveals you something why that error could be happening? Thanks.