Consultor Eletrônico



Kbase 21971: "..driver could not be loaded due to system error 1114.."
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   26/04/2002
SUMMARY:

Using PHP with Progress 9.1C (no patches), SQL-92 MERANT Driver 3.60, and IIS v3/4, you can encounter the following error message:

PHP Warning: SQL error: Specified driver could not be loaded due to
system error 1114 (MERANT 3.60 32-BIT Progress SQL92 v9.1C)., SQL
state IM003 in SQLConnect in c:\inetpub\wwwroot\php\db.php on line 3

EXPLANATION:

PHP is a tool that may be used to connect to Progress databases. It is a shareware product that can be downloaded from the internet by going directly to www.php.net or searching for PHP downloads. The PHP installer is a small file and will not occupy a large amount of space. It installs a CGI version for use with IIS and configures the Web server as well.

Installing and configuring PHP for Windows is straightforward using the default settings. The install wizard gathers information to set up the PHP.ini file and configures the Web server to use PHP.
If the install wizard did not seem to complete the task and errors result in use of the product, refer to the release notes for additional information for editing the PHP.ini file (do a search for it -- on NT it is C:\WINNT).

There is an introductory tutorial that can be downloaded from php.net to help clarify how to use PHP.

SOLUTION:

-- Preliminary Steps:

1) Load the latest patch for 9.1C. The commercial version will fail
with the error in the title.

2) Create a database from Sports2000 (testdb). PROSERVE it using the
-H localhost, -S demosv, -N TCP

3) Connect to testdb via the SQL Explorer Tool. Create a new user
and grant the user dba rights. Test the connection with the new
dba account.

Or, create a new user and grant this user rights to select from
the database tables.

4) Set up the ODBC Data Source using the 9.1C SQL-92 driver to connect
to the testdb. Perform a "Test Connect" using the new dba account
just created.

-- Creating a PHP File:

5) Create a PHP text file. Use a text editor to create the PHP file.
Saving the file with the name of the file in quotes will make sure
no unwanted file extension is added onto the end ("odbc.php") of
the file. The files are stored in the Web server's root directory
(wwwroot).

-- Sample Connection Script:

<html>
<body>
<? ($conn_id=odbc_connect ("edwin","dba1","jojo", SQL_CUR_USE_ODBC));
echo "connected to $conn_id";
?>
</body>
</html>

NOTE: "edwin" is the datasource name, not the database name. "dba1" is the dba user account created above and "jojo" is the password for that account.

-- Sample connection script returning data from the testdb database:

<html>
<body>
<? $query="SELECT * from PUB.CUSTOMER";
($conn_id=odbc_connect ("edwin","dba1","jojo", SQL_CUR_USE_ODBC));
echo "connected $conn_id";
$return=odbc_do($conn_id, $query);
odbc_result_all($return);
?>
</body>
</html>


References to Written Documentation:

PHP Introductory Tutorial (www.php.net)

Progress Knowledge Base Solutions:
21017, "Sample PHP Programs to Access a Progress DB Through ODBC"
20143, "Basic Guide to Defining SQL-92 Database Security"