on 06-06-2007 3:16 PM
Hi All,
We need to build a Web Dynpro application which should interact with SQL Server. We are working on EP 7.0. The current User Database is SQL Server.
For the new Web Dynpro application can we create new Table in the same SQL Server database.
Also, can someone provide some tutorial on how to connect to SQL Server from Web Dynpro.
Regards
Nikhil Bansal
Hi,
You can use the following code to access data from Web Dynpro. One more thing you need to create data source.
try{
Context contxt = new InitialContext();
DataSource datasrc = (DataSource) contxt.lookup("jdbc/<name of the data source>");
Connection connection = datasrc.getConnection();
Statement stmt = connection.createStatement();
ResultSet resultset = stmt.executeQuery("SELECT * FROM <Table Name>");
while(resultset.next())
{
String str1 = resultset.getString(1);
..
....
....
}
}
catch(Exception ex1){
<error report>
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nihil,
Check the blog for connecting to SQL server.
/people/anilkumar.vippagunta2/blog/2007/02/20/reading-and-writing-images-from-sqlserver-in-webdynpro
Regards,Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nihil,
Check the blog for connecting to SQL server.
/people/anilkumar.vippagunta2/blog/2007/02/20/reading-and-writing-images-from-sqlserver-in-webdynpro
Regards,Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.