有关PreparedStatement方法的问题?

胖嘟嘟 2001-09-25 03:07:48
<%@ page import="java.slq.*"%>
Connection conn=null;
conn=DriverManager.getConnection("jdbc:weblogic:pool:GhopPool");

String psql="select h_reserve.h_reserve_id from h_reserve,h_reserve_detail where h_reserve.h_member_card_id='?' and h_reserve.h_reserve_status=3 and indate<'"+sy+"-"+sm+"-1' ";
PreparedStatement pst =conn.preparedStatement(psql);
.........
为什么会报

E:\opt\weblogic\myserver\classfiles\examples\jsp\_private\_hotel\_yd_95_stat\_xintotal_95_jy.java:146: Method preparedStatement(java.lang.String) not found in interface java.sql.Connection.
probably occurred due to an error in /private/hotel/yd_stat/xintotal_jy.jsp line 69:
PreparedStatement pst =conn.preparedStatement(psql);

...全文
94 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
yuanzi 2001-09-30
  • 打赏
  • 举报
回复
呵呵,路过!
cherami 2001-09-30
  • 打赏
  • 举报
回复
快结帐吧!
以后仔细点,多查查API,看看有没有那个方法!
lci21(流浪少年)老兄得满分!
我只是来凑个热闹。哈哈
lci21 2001-09-28
  • 打赏
  • 举报
回复
下面这一句话写错了:
PreparedStatement pst =conn.preparedStatement(psql);
改为:
PreparedStatement pst =conn.prepareStatement(psql);
没有方法preparedStatement(),而应该是:prepareStatement(psql)。

结账吧!呵~~




greed 2001-09-28
  • 打赏
  • 举报
回复
hao

81,122

社区成员

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

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