cancel
Showing results for 
Search instead for 
Did you mean: 

Connect WDJ to Sql server 2005

Former Member
0 Kudos

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

View Entire Topic
junwu
Active Contributor
0 Kudos

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();
}

former_member192434
Active Contributor
0 Kudos

Thanks John for prompt reply,

is that any jar file also required, if yes then where i can put/configure jar files. ....

Or just above code will do the need full.

Thanks

AB

junwu
Active Contributor
0 Kudos

have you done any java jdbc programming?

you should know what jar you need.

it is pure java, nothing to do with sap.

when you create the data source, you will upload the driver to server.

WDJ side has nothing to configure.

Former Member
0 Kudos

Hi Anup,

While creating the datasource you'll have to upload the driver. that is sqljdbc.jar.

You can also keep this jar in lib dc.

Regards

Deepak