stmt=conn.createStatement(); rs=stmt.executeQuery("select * from emp");
newdsn is my dsn name
Joined: Oct 13, 2005
Welcome to the Ranch.
You are not trying to get a class from sun.jdbc. You are trying to get a class from sun.jdbc.odbc. Suggest you edit your post and click on "disable smilies in this post" at the bottom left. That will get rid of the !
...Unless you're not using a Sun JRE (eg IBM, HP etc) in which case the sun packages do not exist.
The extended lesson here is that the JdbcOdbc bridge is a dog and you're better connecting with a Type-4 (native Java) driver than relying on the bridge which isn't really supported and definitely not meant for production.