云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > 数据库系统课程设计报告 正文

数据库系统课程设计报告 正文

  • 62 次阅读
  • 3 次下载
  • 2025/6/4 14:03:13

哈尔滨工业大学(威海)数据库系统课程设计报告 end if

do while true

fetch r_cursor //取数到自己定义的变量中 into :r_id, :r_kind, :r_bed, :r_price, :r_status, :r_describe; if sqlca.sqlcode<>0 then

exit end if

lv_id.additem(string(r_id), t) lv_id.setitem(t, 2, string(r_kind)) lv_id.setitem(t, 3, string(r_bed)) lv_id.setitem(t, 4, string(r_price)) lv_id.setitem(t, 5, string(r_status)) lv_id.setitem(t, 6, string(r_describe)) t=t+1

loop //循环 close r_cursor; //关闭游标

2,按类别查询

string r_id, r_kind, r_bed, r_price,r_status, r_describe string r_kindi int t=1

if ddlb_kind.text=\

12 / 50

哈尔滨工业大学(威海)数据库系统课程设计报告

messagebox(\请选择房间类型!\return

end if

r_kindi=trim(ddlb_kind.text)

lv_kind.deleteitems() //清空lv控件

declare r_cursor cursor for //定义游标 select * from room

where room.r_kind=:r_kindi;

open r_cursor; if sqlca.sqlcode<>0 then messagebox(\提示\游标打开错误!\end if

do while true fetch r_cursor into :r_id, :r_kind, :r_bed, :r_price, :r_status, :r_describe; if sqlca.sqlcode<>0 then

exit end if

lv_kind.additem(string(r_id), t) lv_kind.setitem(t, 2, string(r_kind)) lv_kind.setitem(t, 3, string(r_bed)) lv_kind.setitem(t, 4, string(r_price)) lv_kind.setitem(t, 5, string(r_status)) lv_kind.setitem(t, 6, string(r_describe))

t=t+1

loop close r_cursor;

3,按床位查询 13 / 50

//打开游标 //取数到自己定义的变量中 //循环 //关闭游标 哈尔滨工业大学(威海)数据库系统课程设计报告

string b_id, b_kind, b_bed, b_price,b_status, b_describe string r_bedi int t=1

if sle_bed.text=\

messagebox(\请输入床位数!\return

end if

r_bedi=trim(sle_bed.text)

lv_bed.deleteitems() //清空lv控件

declare r_cursor cursor for //定义游标 select * from room

where room.r_bed=:r_bedi;

open r_cursor; //打开游标 if sqlca.sqlcode<>0 then

do while true

fetch r_cursor //取数到自己定义的变量中 into :b_id, :b_kind, :b_bed, :b_price, :b_status, :b_describe; if sqlca.sqlcode<>0 then

exit

messagebox(\提示\游标打开错误!\end if

14 / 50

哈尔滨工业大学(威海)数据库系统课程设计报告

end if

lv_bed.additem(string(b_id), t) lv_bed.setitem(t, 2, string(b_kind)) lv_bed.setitem(t, 3, string(b_bed)) lv_bed.setitem(t, 4, string(b_price)) lv_bed.setitem(t, 5, string(b_status)) lv_bed.setitem(t, 6, string(b_describe)) t=t+1

loop //循环 close r_cursor; //关闭游标

4,按价格查询

string r_id, r_kind, r_bed, r_price,r_status, r_describe string r_pricei, r_pricej int t=1

if sle_low.text=\

messagebox(\请输入最低价!\return

end if

if sle_high.text=\

messagebox(\请输入最高价!\return

end if

15 / 50

搜索更多关于: 数据库系统课程设计报告 正文 的文档
  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

哈尔滨工业大学(威海)数据库系统课程设计报告 end if do while true fetch r_cursor //取数到自己定义的变量中 into :r_id, :r_kind, :r_bed, :r_price, :r_status, :r_describe; if sqlca.sqlcode0 then exit end if lv_id.additem(string(r_id), t) lv_id.setitem(t, 2, string(r_kind)) lv_id.setitem(t, 3, string(r_bed)) lv_id.setitem(t, 4, string(r_price)) lv_id

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com