database - Unable to read an MS Access Table (linked to an ODBC Data Source) using PHP -


i working on application in data odbc enabled data source imported ms access 2007 database using linked table. tricky part every time link refresh made (or linked table opened) odbc data source prompts out window 4 different parameters (username, password, servername, workgroupname) have input.

while possible manually, find no way read linked table programatically.

i using php script read linked table. execution of php script halted indefinitely when try read linked table. dsn configured , can read data in other cases including linked tables in data source doesnot require input parameters/credentials. however, fails in case.

in nutshell, system php<-->ms access (linked table)<--odbc data source. php script aims read updated data odbc data source using linked table. reasons, php cannot directly interface odbc data source, using ms access intermediary.

the odbc_connect function of php allows dsn name, username, password, cursor_type parameters. not sure how input 4 parameters (username, password, servername, workgroupname) required odbc data source ms access table linked.

i using php 5.4 on windows 7 ms access 2007.

i request developer community me necessary pointers on this. suggestions workaround welcome.

thanks in advance.

if using double odbc: php > odbc > ms access > odbc > source.. have following options.

  • cut off "access" middle man , connect directly.
  • if want use ms access, use "file dns" connect linked tables ms access file dns has 4 parameters initialized. (this eliminate ms access asking enter server information when refreshing linked tables)
  • haven't tried php side can loop through msysobjects table or database.tabledefinitions , update link custom connection string.

any way, solution trouble be. make access not prompt parameters when refreshing linked tables either using file dns or save passwords.


Comments