请教!!

park1974 2002-09-02 03:28:13
如何执行delete,update的带有参数的语句
就象
DM->Query->Param语句
怎样实现delete呢?
...全文
52 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
advanced 2002-09-03
  • 打赏
  • 举报
回复
方法一:
Statement St = Conndefinedres.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
ResultSet Rs = St.executeQuery(sql);
Rs.last();
int Rs_count = Rs.getRow();
Rs.first();//重新回到第一个记录;
方法二:
Statement St = Conndefinedres.createStatement();
ResultSet Rs = St.executeQuery(sql);
Rs.next();
int Rs_total=0;
for (Rs_total = 1; Rs.next(); Rs_total++);
// reset the cursor to the beginning
Rs.close();
Rs = St.executeQuery(sql);
Rs.next();
park1974 2002-09-02
  • 打赏
  • 举报
回复
就是用Query控件不能执行delete语句,怎样才能执行带有参数的delete语句呢
unicornindeed 2002-09-02
  • 打赏
  • 举报
回复
不明白你的意思。能不能说明白点??

81,115

社区成员

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

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