cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting to SQL database

Former Member
0 Kudos

Hi all,

i want to know about all the options of connecting to sql database from webdunpro application and their comparisons of advantage and disadvantages.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

got answered

Former Member
0 Kudos

hi all,

actually i have created a dsn in VA and using this DSN i am connecting to database....but i want to chk that craeting a dsn and connecting database is good practice or any other way is good practice....

Former Member
0 Kudos

Hi,

What you have done is correct.But,where you are executing the database query is your choice.There are different ways as given in the above posts.But for connectiNg to the database creating the DSN in VA. is mandatory

Former Member
0 Kudos

hi anup,

i have gone through this link before also ...i just want to know for connecting to sql by simple webynpro application what are the ways and what is advantage and disadvantage over each others....

Former Member
0 Kudos

Hi,

Case1:

You create a method in component controller and directly write the code to connect to the sql data base, execute the query and get the result state.

Case2:

in this case create a saperate java project, in that write a method which connects to the data base,executes the query and returns the result.

Now expose this function as webservice and use it in webdynpro as a Adaptive webservice mode.

In case 2 the backend is completely abstracted from the UI

Former Member
0 Kudos

Hi Saifee,

You can connect to sql directly from webdynpro or by consuming services which inturn connects to the database.

The usual good practice is to opt to the second option.

You can have a CAF application service or a plain java class exposed as a service for establishing connection and to manipulate data from and to database. Then you can consume this service in your webdynpro. This creates a layer of abstraction and separates backend from UI.

Hope it helps you.

Regards,

Srinivasan Subbiah

former_member192434
Active Contributor
0 Kudos

Hi

Check out these link might help u

thanks