主题:一个vfp的神奇问题
clear
@1,2 say "输入1,按学号查询;输入2,按姓名查询"
i=0
open database d:\stu\stu.dbc
btext=" "
@2,2 say "选择" get i
read
do case
case i=1
@3,2 say "输入要查询的学号" get btext
read
btext=trim(btext)
[color=800000]select * from s where sno=btext into cursor sdata readwrite[/color]
select sdata
if reccount()!=0
list
else
messagebox("没有要找的学生",0)
endif
case i=2
@3,2 say "输入查询学生的姓名"get btext
read
btext=trim(btext)
[color=800000]select * from s where sname=btext into cursor sdata readwrite[/color]
select sdata
if reccount()!=0
list
else
messagebox("没有要找的学生",0)
endif
endcase
close all
请高手帮忙:红色字体中出现不能识别的短语或关键字?查可好长时间就不知道出在什么地方,请路过着帮个大忙,本人将不甚感激的啊!
@1,2 say "输入1,按学号查询;输入2,按姓名查询"
i=0
open database d:\stu\stu.dbc
btext=" "
@2,2 say "选择" get i
read
do case
case i=1
@3,2 say "输入要查询的学号" get btext
read
btext=trim(btext)
[color=800000]select * from s where sno=btext into cursor sdata readwrite[/color]
select sdata
if reccount()!=0
list
else
messagebox("没有要找的学生",0)
endif
case i=2
@3,2 say "输入查询学生的姓名"get btext
read
btext=trim(btext)
[color=800000]select * from s where sname=btext into cursor sdata readwrite[/color]
select sdata
if reccount()!=0
list
else
messagebox("没有要找的学生",0)
endif
endcase
close all
请高手帮忙:红色字体中出现不能识别的短语或关键字?查可好长时间就不知道出在什么地方,请路过着帮个大忙,本人将不甚感激的啊!