ERROR: Message file 'oracle.jdbc.dbaccess.Messages' is missing.这是怎么回事?

zhangzgsky 2004-03-24 10:32:16
求大家帮忙
我向 数据库 添加一条记录 时出现的错误
...全文
322 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
zeros 2004-03-25
  • 打赏
  • 举报
回复
你不能用一个statement,必须在获得一个,但你可以用同一个连接。
zhangzgsky 2004-03-25
  • 打赏
  • 举报
回复
try {
conn = Pool.getConnection();
stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
String strPassword="";

String sqlStr="select pwd from users where mobile='"+src+"'";
//out.println(sqlStr);
ResultSet rs = stmt.executeQuery(sqlStr);
if(rs.next()){
// out.println("have data");
strPassword=rs.getString("pwd");
}else{
strPassword="";
}
// out.println("你的密码为"+strPassword);
rs.close();
stmt.close();
conn.close();
//发送 信息 代码
if(strPassword==""){
strPassword = (new Long(System.currentTimeMillis())).toString().substring(9);
out.println("insert into users(id,mobile,pwd,account,usertypeid,isactive,regtype) values(USERS_ID.nextVal,'"+src+"','"+strPassword+"',0,0,0,'w')");
////////出错就在下一行,其他的都没错:((
stmt.executeUpdate("insert into users(id,mobile,pwd,account,usertypeid,isactive,regtype) values(USERS_ID.nextVal,'"+src+"','"+strPassword+"',0,0,0,'w')");
}
String cc="谢谢您使用ray5198的短信服务,"+strPassword;
// out.println(cc);
webSend ws=new webSend();
boolean flag=ws.sendMT(src,src,"2",cc,"15","0");
// out.println("发送短信结果"+flag);
if(flag==true){
// out.println("ok");
response.sendRedirect("get2.jsp");
}
else{
// out.println("wrong");
response.sendRedirect("get1.jsp");
}

}//try
catch(SQLException e) {
out.println("ERROR: " + e.getMessage());
e.printStackTrace();
}finally {
conn.close();
}
zhangzgsky 2004-03-25
  • 打赏
  • 举报
回复
thanks
if ok give fen to u
wandou999 2004-03-24
  • 打赏
  • 举报
回复
贴愿码!!

81,092

社区成员

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

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