cancel
Showing results for 
Search instead for 
Did you mean: 

How to find Oracle drivers are installed in WAS

Former Member
0 Kudos

Hi

I am doing Proto type application using webdynpro.I want to create tables in Oracle database,because WAS is installed on Oracle.Now i went to Visual Admin tool and checked the "JDBC Connector" properties.I tried to create the new 'DataSource".While creating DataSource ,it is asking me DriverName,Driver ClassName,Version.I have following questions:

1.How to find the wheather Oracle drivers are installed or not?if not where to get these drivers?

2.Once DataSource is created ,how to test wheater it is working fine or not?please help

Thanks

Prasad

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I forgot,

If you want to create or delete tables, it would be best for you to create a java dictionary proyect and define your tables there.

The you can use the procedure described above for inserting, querying and updating your data.

Best regards,

Homer Vargas

Former Member
0 Kudos

Hi Homer

Thanks for your reply.I had given 6 points.now i created the Dictionary DC where i defined the table.then i created the Webdynpro DC where i defined the context based structure.but i would like to know answers to following questions:

1.how to expose table from dictionary DC to webdynpro DC?

2.once i exposed the table,is it possible to create context based on this table?

3.in this senario do i need to write the code to insert/delete/update the values in table

Please help

Thanks

Prasad

Former Member
0 Kudos

Hello Prasad,

Don't create a new datasource, but create a datasource alias for the existing SAP<sid>DB datasource with your new name.

<u>(remember to restart the j2ee cluster)</u>

Then in your application instatiate the datasource and use your create/update/select statements.

<b><i>Once this is set up test from your java code as follows:</i></b>

InitialContext ic = new InitialContext();

DataSource mySource = (DataSource)ic.lookup("java:comp/env/jdbc/YourDataSource");

or.. DataSource mySource = (DataSource)ic.lookup("java:jdbc/YourDataSource"); <b>(can't remember which of the 2 worked)</b>

if this throws a NamingException, then your alias doesn't work, or perhaps you forgot to restart the cluster.

After this executes successfully, use the datasource freely.

Connection con = mySource.getConnection();

con.executeQuery

con.executeUpdate

con.executeStatement

ect...

And forget about oracle, sapdb, informix, db2, or whatever drivers. This makes your application portable and independent from the DB layer.

Please feel free to reward points if this solves your problem.

Best regards,

Homer Vargas