Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

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:

    $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
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

Can somebody please help, or point me in the direction of some sample


Marc Holt.

Site Timeline