aspose file tools*
The moose likes JDBC and the fly likes WebSphere - MSAccess Connection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "WebSphere - MSAccess Connection " Watch "WebSphere - MSAccess Connection " New topic
Author

WebSphere - MSAccess Connection

Neela Sathesh
Ranch Hand

Joined: Jan 19, 2004
Posts: 50
hi,

I m using wsad5.1.1 and i connecting to database MSACCESS in my servlet.But i got the following exception in the statement below,


Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

EXCEPTION:ClassnotFoundException "sun.jdbc.odbc.JdbcOdbcDriver"

But i when run a standalone java application it works fine.
Can i know abt the problem??

With rgds,
Sathesh


With regards,<br />Neela.N
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

This is just a guess, but by default WSAD uses the IBM JDK which may not include the JDBC-ODBC bridge. Trying running the app within WSAD specifying the Sun JDK explicitly.

Dave
Neela Sathesh
Ranch Hand

Joined: Jan 19, 2004
Posts: 50
hi,
thanks 4 ur reply.Can u say how to do that??
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

This is how to do it in Eclipse 3, it should be pretty close...

In your Preferences>Java>Installed JREs, add the location of your Sun JRE
Open the program you want to run, from the run dropdown, select 'Run...', select 'Java Applicatio', New, make sure the correct class is selected, on the JRE tab select 'alternate JRE' and select the JRE you just added.

Now when you choose to run this class it will run using the JRE specified and not the default (possibly IBM) JRE.

I hope this helps.

ps please reduce the use of contractions (4, ur, abt, rgds, u etc) They make posts harder to read and reduce understanding. Particularly for this site which has a high proportion of international visitors.

thanks,
Dave.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: WebSphere - MSAccess Connection