when i write code through jsp page ,it works properly that is a connection is established table is created records inserted etc. but when i write code i.e class ,the code gets compiled but when i try to run the programe the following errors occur.
D:\prachi_java>java tryjdbc java.sql.SQLException: Specified driver could not be loaded due to system error 1157 (Oracle ODBC Driver). D:\prachi_java>java tryjdbc java.sql.SQLException: Specified driver could not be loaded due to system error 1157 (Oracle ODBC Driver). both these errors come when i write the code in try ,catch block. the below given error comes when i write the code without try ,catch block. D:\prachi_java>java tryjdbc Exception in thread "main" java.sql.SQLException: Specified driver could not be loaded due to system error 1157 (Oracle ODBC Driver). at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:4089) at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:4246) at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:1136) at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:1 48) at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:167) at java.sql.DriverManager.getConnection(DriverManager.java:457) at java.sql.DriverManager.getConnection(DriverManager.java:137) at tryjdbc.main(tryjdbc.java:23)
Prachee, The first part of your post has me confused. But in any case, according to the error details you have posted, it appears that the JVM cannot find the "Oracle ODBC Driver". For your information, this driver can be downloaded from the following Web page: http://otn.oracle.com/software/tech/windows/odbc/index.html Good Luck, Avi.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com