数据库课程设计报告和设计实例
MessageBox("[/font][font=宋体]学生查询[/font][font=Times New Roman]","[/font][font=宋体]对不起[/font][font=Times New Roman],[/font][font=宋体]没有该学生[/font][/size][size=3][font=Times New Roman]")
ELSEIF SQLCA.SQLCode>0 THEN
MessageBox("[/font][font=宋体]数据库错误[/font][/size][size=3][font=Times New Roman]",SQLCA.SQLErrText,Exclamation!)
END IF
[/font][font=宋体]窗口([/font][font=Times New Roman]w_squery[/font][font=宋体])[/font][/size][size=3][font=宋体]控件[/font][font=Times New Roman]groupbox(text[/font][font=宋体]属性为:[/font][font=Times New Roman]“[/font][font=宋体]选择查询模式[/font][font=Times New Roman]”)[/font][font=宋体]包含[/font][font=Times New Roman]2[/font][font=宋体]个[/font][font=Times New Roman]RadioButton[/font][font=宋体]控件,它们的[/font][font=Times New Roman]text[/font][font=宋体]属性分别为按年级查询和按班级查询[/font][/size][size=3][font=宋体]控件[/font][font=Times New Roman]SingleLineEdit[/font][font=宋体]([/font][font=Times New Roman]text[/font][font=宋体]属性为[/font][font=Times New Roman]Null[/font][font=宋体])功能为获得输入的年级[/font][font=Times New Roman]/[/font][font=宋体]班级编号[/font][/size][size=3][font=宋体]控件[/font][font=Times New Roman]CommandButton[/font][font=宋体]([/font][font=Times New Roman]text[/font][font=宋体]属性为确定)的[/font][font=Times New Roman]Clicked[/font][font=宋体]事件代码:[/font][/size]
[font=Times New Roman][size=3]integer n
integer slen
slen=Len(sle_1.text)
n=asc(sle_1.text)-48
if (slen>1 or slen=0) then
messagebox("[/size][/font][size=3][font=宋体]错误[/font][font=Times New Roman]","[/font][font=宋体]数据非法[/font][/size][size=3][font=Times New Roman]!")
sle_1.text=""
elseif (n<1 or n>9) then
messagebox("[/font][font=宋体]错误[/font][font=Times New Roman]","[/font][font=宋体]数据非法[/font][/size][size=3][font=Times New Roman]!")
end if
connect using SQLCA;
if rb_1.checked=true then
select info.sno,info.sname,exam.cno,course.cname,exam.score
from info,course,exam
where info.sno =exam.sno and ,exam.cno =course.cno and info.grade=n
end if
if rb_2.checked=true then
select info.sno,info.sname,exam.cno,course.cname,exam.score
from info,course,exam
where info.sno =exam.sno and ,exam.cno =course.cno and info.class=n
end if
[/font][font=宋体]窗口([/font][font=Times New Roman]w_table[/font][font=宋体])[/font][/size][size=3][font=宋体]控件[/font][font=Times New Roman]groupbox(text[/font][font=宋体]属性为:[/font][font=Times New Roman]“[/font][font=宋体]选择模式[/font][font=Times New Roman]”)[/font][font=宋体]包含[/font][font=Times New Roman]2[/font][font=宋体]个[/font][font=Times New Roman]RadioButton[/font][font=宋体]控件,它们的[/font][font=Times New Roman]text[/font][font=宋体]属性分别为按年级输出和按班级输出[/font][/size][size=3][font=宋体]控件[/font][font=Times New Roman]SingleLineEdit[/font][font=宋体]([/font][font=Times New Roman]text[/font][font=宋体]属性为[/font][font=Times New Roman]Null[/font][font=宋体])功能为获得输入的年级[/font][font=Times New Roman]/[/font][font=宋体]班级编号[/font][/size][size=3][font=宋体]控件[/font][font=Times New Roman]CommandButton[/font][font=宋体]([/font][font=Times New Roman]text[/font][font=宋体]属性为确定)的[/font][font=Times New Roman]Clicked[/font][font=宋体]事件代码:[/font][/size]
[font=Times New Roman][size=3]integer n
integer slen
slen=Len(sle_1.text)
n=asc(sle_1.text)-48
if (slen>1 or slen=0) then
messagebox("[/size][/font][size=3][font=宋体]错误[/font][font=Times New Roman]","[/font][font=宋体]数据非法[/font][/size][size=3][font=Times New Roman]!")
sle_1.text=""
elseif (n<1 or n>9) then
messagebox("[/font][font=宋体]错误[/font][font=Times New Roman]","[/font][font=宋体]数据非法[/font][/size][size=3][font=Times New Roman]!")
end if
connect using SQLCA;
if rb_1.checked=true then
select * from dep_exam,info where info.grade=n
end if
if rb_2.checked=true then
select * from dep_exam,info where info.class=n
参与评论
- 相关内容
- 最近更新
- ·在控制面板中,程序卸载里找不到..
- ·有没有木马病毒专杀软件
- ·Windows Genuine Advantage
- ·用五笔怎么打字
- ·怎么用MSN聊天?
- ·怎样将C盘中卸载不了的程序弄掉
- ·帮忙取个网络公司名字,急急急~~~
- ·影音嗅探专家 v2004.11软件怎么用
- ·我桌面上的一个文件夹怎么删不了..
- ·“Thumbs"是不是病毒,..
添加到百度搜藏