on 09-20-2006 4:51 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.