SAGE LINE 50 & ODBC CONNECTION

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • marc.holt@pif.co.uk

    SAGE LINE 50 & ODBC CONNECTION

    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($d sn, $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\wwwroo t\sage.php on line 70

    [Line 70 - $sage_conn = odbc_connect($d sn, $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.

Working...