使用websphere带的J2RE 1.4.1 IBM Windows 32 build cn1411-20031011,运行application,连接access出错!!!!

shw3 2005-03-30 02:34:43
如题。。
代码如下:
//取得连接
try{
String strurl="jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ=database/statute.mdb";
common.WriterLog("ForName!!!!");
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
common.WriterLog("ForName");

Connection conn=DriverManager.getConnection(strurl) ;
common.WriterLog("Connection");
return conn;
}catch(Exception e){
common.WriterLog("getConnection"+e);
return null;}
}

后台打印:
[ 2005-03-30 14:32:49 ] SystemOut o ForName!!!!
[ 2005-03-30 14:32:49 ] SystemOut o ForName
[ 2005-03-30 14:32:49 ] SystemOut o getConnectionjava.lang.NullPointerException
...全文
48 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
shw3 2005-03-31
  • 打赏
  • 举报
回复
怎么没人来啊??
OnlyFor_love 2005-03-30
  • 打赏
  • 举报
回复
路过!

不太懂!

我也学习学习!

嘿!

62,629

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧