This JDBC-ODBC bridge setting is for the Microsoft 2000 O/S. It may vary slightly for other operating systems. Go to your computer's Control Panel > Administration > Data Sources (ODBC), and create a UserDSN for Microsoft Access DB (MDB). Select the Select option, and locate your previously created trialaccessdb.mdb file. Then click Advanced Options and specify the user name Admin and password password in this tab. Carry out the same procedure for the SystemDSN. Now go to your BEA WebLogic Administration Console and click JDBC. Configure a new connection pool named AccessConnectionPool (you can use any name; just remember to define this connection pool name as the variable POOL_NAME in your JDBC application code). Set the properties as follows: URL: jdbc:odbc:trialaccessdb Driver Classname: sun.jdbc.odbc.JdbcOdbcDriver Properties: user=Admin Password: password Click Create. Then click Targets and select the server either examplesServer or myServer and transfer the selection to the chosen selection box. Click Apply. In your JDBC application code, use the following strings to open a database connection: private static final String DRIVER_NAME = "weblogic.jdbc.pool.Driver"; private static final String POOL_NAME = "AccessConnectionPool"; Now, to run this example, you need to restart your WebLogic Server so that WebLogic can initialize the connection pool on startup. If you face any problems, check your JDBC-ODBC configuration and, most important, verify that you have configured the user name and password correctly in the user and System DSN settings. The System DSN is required since Windows 2000, based on Windows NT, requires that all users be able to access the database. The User DSN allows only the user configuring the database to access it. Most important, check that the server on which you are running your exercises has been selected in the Target tab of the connection pool settings and has been transferred to the chosen section. |