web Dynpro application connecting to sql server
I want to fetch data from SQL Server using webdynpro. Can anyone suggest me the steps to do this? I need to connect the SQL Server also to portal. I found one using visual admin another using system object in portal. Which is better way and how can use that connected system in coding to retrive data.
Please help me. Points will be awarded for helpful answets.
Lokesh Kamana replied
You place the code where ever you want to establish the connection to the data base which is located remotely in a diffrent IP from NWDS.
The requirement for this we have 3 jar files.Which you have to copy in the lib folder.
conn = DriverManager.getConnection( "jdbc:microsoft:sqlserver://XX.XX.XX.XX:XXXX;databaseName=TrackingSystem","sa","sa" ) ;
Statement st = conn.createStatement();
String str = "select * from User Table";
ResultSet rs = st.executeQuery(str);
String str1 = rs.getString(1);
Thanks & Regards,