on 07-20-2011 5:12 PM
Dear Experts,
I need to connect, SQL server 2005 unsing WD java, can any one tell me what steps i need to do on WDJ side to established the connection.
Also the what all jar files required to connect SQL 2005.
Thank
AB
what's the version of your nw java server?
if you are in nw7, you have to create a datasource in VA
if you are in CE, you have to create a datasource in NWA.
after the data source is created, the left is pure java programming.
try {
InitialContext initialContext = new InitialContext();
DataSource dataSource = (DataSource)initialContext.lookup("jdbc/YOUR_DB_ALIAS");
connection= dataSource.getConnection();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NamingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
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.