cancel
Showing results for 
Search instead for 
Did you mean: 

Direct Access

Former Member
0 Kudos

Hi Guys,

How do I directly access the database using webdynpro? Thanks.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Going by the MVC design pattern, it is not recommended to have database access logic in the WebDynpro component.

You should use an EJB or a JDO to access the database.

However, if you are keen on accessing it from Web Dynpro, then ideally in the wdDoInit() method of the controller you will do a JNDI look up for the Data Source and establish a connection and use this connection in the event handlers for making actual database calls.

Regards,

Manish

former_member182372
Active Contributor
0 Kudos

Hi,

as one of possible approach you can try JDO:

<NWDS install path>\SAP\JDT\eclipse\examples\J2EE_GettingStartedJDO.zip

And to bind results you can use JavaBean model in dynpro.

Regards Maxim R.

Former Member
0 Kudos

Hi Chia,

You can access the database either by creating an EJB or by just creating a JDBC connection.

Regards

Noufal