您的位置 电脑知识爱好者 >> 编程知识 >> 数据库课程设计报告和设计实例

数据库课程设计报告和设计实例

电脑知识爱好者http://www.l9l8.com本站整理2007-6-20 14:35:11
知识重点:数据库课程设计报告和设计实例 sql数据库课程设计 数据库课程设计实例vid 自动编号 username 用户(varchar) filepath 文件路径(varchar) filename 文件名(varchar) addtime 时间(smalldatetim..
IF SQLCA.SQLCode=100 THEN
    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

 

参与评论
相关内容
关于我们 | 隐私政策 | 站点地图 | 站长博客|京ICP备07025396号
添加到百度搜藏 添加到百度搜藏 电脑知识爱好者Copyright ?2006-2008版权所有 我要啦免费统计