cancel
Showing results for 
Search instead for 
Did you mean: 

access to portaltable

Former Member
0 Kudos

Hallo,

can anyone tell me how i can get access to a table that is stored on our portal via webdynpro? Do i have to create a jdbc connection in java? Are there any examples? Our database-engine is maxdb.

We still get access to the table via an external sql-client (e.g. squirrel), where we also can use the table with usual sql-queries. But how can handle that with webdynpro?

Thanks a lot for your help,

Marcel

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI Marcel,

Use follwoing code

Context ctx = new InitaialContext();

DataSource ds = (DataSource)ctx.lookup("jdbc\<alias name>");

Connection con = ds.getConnection();

Statement st = con.createStatement();

Resultset rs = st.executeQuery("select * from tab ");

hope this helps

With Regards

Naidu

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Marcel,

You can configure DataSource in VisualAdmin for database or create database alias.Using JDBC calls you can access ur data in the tabel

hope this helps

With regards

Naidu

Former Member
0 Kudos

Thanks for your help...

if i understand:

i configure a datasource or an alias via VisualAdmin for my created table. After that i can get access to the table with webdynpro ( SAP Netweaver Developer Studio) via this datasource or alias?

And how can i implement this created alias or datasource into an webdynpro-project?

Thanks a lot for your answer,

Marcel