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.
Hi Anup,
If you are using NWDS 7.0 version, you have to create a Datasource in visual admin.
If you are using CE 7.1 version, you have to create a Datasource in NWA--Configuration Management->Infrastructure->Application Resources.
Step by step procedure how to create a Datasource in NWDS 7.0 and CE7.1 is given in this PDF link.
MYSQL Server 2005
Driver/jar which you have to use --> sqljdbc.jar
Driver class --> com.microsoft.sqlserver.jdbc.SQLServerDriver
Connection URL --> jdbc:sqlserver://<host_name>:<port>;database=<db_name>
Hope this helps you..
Regards,
Saleem Mohammad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
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.