on 01-18-2007 10:32 PM
Hi all,
i intead to make a web dynpro application which will store the data entered by the user in an oracle database
How am i to obtain webdynpro - oracle connectivity?
points assured for Help
Hi Shobhendra,
The simplest way is to use Visual admin. For that , do the following
1.Run Go.bat in the server to open Visual Admin.
2.Select Cluster->JDBC Connector
3.In Runtime, Create a driver of any name(Say mydriv). Select classes12.jar for that
4.Create a new datasource(Say myDS). There specify the
driver class as oracle.jdbc.driver.OracleDriver
database url as jdbc:oracle:thin@IPADDRESS OF ORACLE SERVER:PORT:SID
driver as mydriv
The PORT will usually be 1527 or 1521.
For IPADDRESS, PORT and SID, u have to contact db admin
5. In additional , select Vendor or Native SQL
6. Test the connection using Monitoring tab. If green line is coming, then connection is successful, otherwise, the parametes u used will be incorrect
7.In ur webdynpro code, inorder to get the Connection to oracle, add the following
InitialContext ctx=new InitialContext();
DataSource ds=(DataSource)ctx.lookup("jdbc/myDS");
Connection con=ds.getConnection();
8. Press CTRLSHIFTO
Regards
Fahad Hamsa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Shobhendra,
1. Configure the DataSource in Visual Administrator for the oracle database you are connecting.
In Visual Administrator under server->services you will see JDBC Connector, click on that and on right side you will see the DataSource. Here you have to create the DataSource for the oracle database you are planning to connect.
2. Once you create the DataSource, you have to create an EJB to access the DataSource and add functions to EJBS to insert or select data from the database.
3. Create a WebDynpro application which uses EJB model and then configure the context to bind to the UI elements.
Hope this helps to start with.
Thanks
Anu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anu,
I like to to know two things.
Que_A)Why is it necessary for me to create DataSource in VA?.I remeber maintaining SQL connection with Java in good old days by follwing steps
1.Create System DSN/File DSN (where you add login,pawwd,DB server,DB name)
2.write SQL Connecting statements
Is that way is not suggested? or Do not work for WebDynpro programs.Can you plz clarify me
Que_B) Why is it important to Create EJB model?
Is updating/Insterting through executeQuery() or UpdateQuery() do not work or not suggested?
I appreciate your responce. Thank you
Maruti
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
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.