This is a discussion on SAGE LINE 50 & ODBC CONNECTION within the PHP Language forums, part of the PHP Programming Forums category; Please help! I am attempting to extract data from a Sage Line 50 database ( .dta extention) via an ODBC connection. ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Please help!
I am attempting to extract data from a Sage Line 50 database ( .dta extention) via an ODBC connection. Included in the application install of Sage Line 50, is an ODBC driver. I have successfully managed to extract data from other SQL databases using ODBC connections with no errors. The php code I am using is: <?php $db_user = "aUser"; $db_pass = "aPassword"; $dsn = "SageLine50v10"; $sage_conn = odbc_connect($dsn, $db_user, $db_pass); ?> And the result is this: Warning: odbc_connect() [function.odbc-connect]: SQL error: Cannot find all files in data path, SQL state 08001 in SQLConnect in C: \Inetpub\wwwroot\sage.php on line 70 [Line 70 - $sage_conn = odbc_connect($dsn, $db_user, $db_pass);] The response I received after contacting Sage is as follows: "This message appears when using the ODBC driver from Sage Line 50 when the ODBC set up is incorrect. To correct this you need to change the data path you have setup to the correct ACCDATA subdirectory." The directory "ACCDATA" is where the .dta files are kept. Assuming that ACCDATA means Accounts Data - there are a number of .dta files with file names that relate to the table names used within the Sage Application. The table I wish to extract data from is called "Header", with a related file name of "Header.dta" within the "ACCDATA" directory. To test that the ODBC connection is working correctly, I have managed to extract data from this table using MS Excel, FileMaker and Alpha Five. Can somebody please help, or point me in the direction of some sample coding? Regards, Marc Holt. |