当前位置: 技术问答>java相关
jdbc.odbc连接sql server的问题:
来源: 互联网 发布时间:2015-04-05
本文导语: 在语句Class.forName("sun.jdbc.odbc.JdbcOdbcDriver")出现如下错误: "test_jdbcodbc.java": Error #: 360 : unreported exception: java.lang.ClassNotFoundException; must be caught or declared to be thrown at line 19, column 20 在其它的有关数据库操作的...
在语句Class.forName("sun.jdbc.odbc.JdbcOdbcDriver")出现如下错误:
"test_jdbcodbc.java": Error #: 360 : unreported exception: java.lang.ClassNotFoundException; must be caught or declared to be thrown at line 19, column 20
在其它的有关数据库操作的词句均有如下错误:
"test_jdbcodbc.java": Error #: 360 : unreported exception: java.sql.SQLException; must be caught or declared to be thrown at line 20, column 48
"test_jdbcodbc.java": Error #: 360 : unreported exception: java.lang.ClassNotFoundException; must be caught or declared to be thrown at line 19, column 20
在其它的有关数据库操作的词句均有如下错误:
"test_jdbcodbc.java": Error #: 360 : unreported exception: java.sql.SQLException; must be caught or declared to be thrown at line 20, column 48
|
你没有捕捉ClassNotFoundException和SQLException异常