on 07-09-2008 7:13 AM
Hi,
I want to access java dictionary database table in my web dynpro application in java.
Right now I have created one java dictionary DC.
and in that Dc i have created two database table .
Now I want to use this table in my web dynpro application.
Can anyone help me.
Hi,
Have a look at this https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00c062ec-f90d-2a10-52bd-df57de2d...
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use the Dictionary Projects to create tables in Database. You must use codes to access these database tables that is created using Dictionary projects.
You have to use the DataSource in order to get connection ; Use Visual Administrator to see the data source name.
You can use the following code to access the database table.
ResultSet result = null;
try
{
InitialContext initialcontext = new InitialContext();
DataSource datasource = (DataSource)initialcontext.lookup("jdbc/<DataSourceName>");
Connection connection = datasource.getConnection();
Statement statement = connection.createStatement();
result = statement.executeQuery( <Query>);
connection.close();
} catch (NamingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Regards
Vinod
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Deploying of a java dictioary, creates the table in database. generally portaldb would be maxdb.
Use the [JDBC programming|http://www.mysql.com/sap] to connect with maxdb by using [datasource|http://dev.mysql.com/doc/maxdb/en/84/1d733cefd63c38e10000000a114084/content.htm].
otherwise you can develope ejb to connect with table and use that [EJB in webdynpro|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1f5f3366-0401-0010-d6b0-e85a49e93a5c]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.