This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
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)
Shankar Narayana
Ranch Hand
Joined: Jan 08, 2003
Posts: 134
posted
0
Hi, Check whether the classes12.zip file , which contains the oracle driver is in your classpath or not.
"Failure is not when you fall down; its only when you fail to get up again."
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.