×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Revisit: Connect via ODBC on IIS with PHP

Revisit: Connect via ODBC on IIS with PHP

Revisit: Connect via ODBC on IIS with PHP

(OP)
This has been discussed before but the threads are old and I want to revisit it.

I want to connect to MAS90 via the normal ODBC driver and PHP to the database found on a second server within the same local domain.

Goal: Mirror MAS90 data into MySQL database on webserver for daily reporting

- I have an IIS 6.0 on Server 2003 Standard and running PHP5.
- IIS is running all services with local service account.
- I installed Mas90 3.7 Workstation on the server. <Mas client works>
- I created a custom System DSN (MAS90db) using the default Mas90 driver with User/Pass/Company saved. <connection works>

I created the following PHP file:

CODE

<?php
$conn = odbc_connect('MAS90db',',');
if (!$conn)
    {exit("Connection Failed: " . $conn);}
else
    echo"Connected<BR>";

if (!$conn) {
    exit("Connection Failed: " . $conn);
    } else {
        echo "Connected<br />";
        $query = "SELECT AR1_CustomerMaster.Division, AR1_CustomerMaster.CustomerNumber FROM AR1_CustomerMaster ORDER BY AR1_CustomerMaster.CustomerNumber";
        $result = odbc_exec($conn, $query) or die(odbc_errormsg());
        }
odbc_close($conn);
echo"Connection Closed";
?>

When run the script returns:

CODE

Connected
Connected
Warning: odbc_exec() [function.odbc-exec]: SQL error: [ProvideX][ODBC Driver][FILEIO]Table is not accessible, SQL state S000 in SQLExecDirect in D:\Webdata\apps\mas\test.php on line 27
[ProvideX][ODBC Driver][FILEIO]Table is not accessiblePHP Warning: odbc_exec() [function.odbc-exec]: SQL error: [ProvideX][ODBC Driver][FILEIO]Table is not accessible, SQL state S000 in SQLExecDirect in D:\Webdata\apps\mas\test.php on line 27

I changed the IIS directory security to disallow anon access  and use the AD digest authentication to force a user/pass prompting. Used a valid MAS90 allowed user from within the domain with same results.

Nothing I try seems to allow access to the data itself. The ODBC connection seems valid but I cannot get a tables listing and all direct queries to a table by name fail.

I have tried some of the solutions mentioned in other threads; changing the service account user, using a connection string, etc. Nothing seems to help.

I would be interested in any technical responded help here. Any commercial solutions should be sent to my email directly.

Any help is appreciated.
Jon Black
862-432-6992
jblack@syncom.net
jonblack@hawkswing.com

RE: Revisit: Connect via ODBC on IIS with PHP

You would get more and better responses if you posted on the Sage Community at community.sagemas.com

Note that the current version of MAS is 4.30 and in 3 months will move to v4.40. ALL support for v3.71 is due to end shortly thereafter.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close