vf的时钟控件不能与select语句同用?

akejr 2010-01-06 10:15:29
我做的表单是学校布置的作业
要求有一个5个页面的页框
每个页面有不同的功能
其中第一个页面是登录页面,里头的代码有select语句
第二个页面是可以自动查询的
自动查询的那个页面有个时钟控件
每次只要是登录了再进查询页面自动查询就不会自动跳到下一条信息
但是如果不登陆直接运行的话自动查询又能用
请问时间控件是不是不能与select语句同时用呢
有没有办法解决这个问题
...全文
93 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
akejr 2010-01-06
  • 打赏
  • 举报
回复
select * from student where sno= this.parent.text10080297.value and dtos(birthday)=this.parent.text20080297.value into cursor ycp1
if (not eof())and (not bof())
messagebox("欢迎进入学生信息管理系统!","提示0080297")
thisform.pageframe10080297.yangcp2.setfocus
thisform.pageframe10080297.yangcp2.enabled=.t.
thisform.pageframe10080297.yangcp3.enabled=.t.
thisform.pageframe10080297.yangcp4.enabled=.t.
thisform.pageframe10080297.yangcp5.enabled=.t.
else
num=num+1
if num>=3
messagebox("密码输入错误已达三次!再见","提示0080297")
thisform.release
else
messagebox("密码错误!","提示0080297")
endif
endif
这是在第一面的登录页面的登录按钮的代码
如果不点击就能够自动查询
点击了就不会自动查询了……
下面的是时间控件的代码if eof()
go top
endif
this.parent.combo10080297.readonly=.f.
this.parent.combo10080297.value=student.sno
this.parent.label30080297.caption=student.sname
this.parent.label50080297.caption=student.sex
this.parent.label70080297.caption=dtos(student.birthday)
this.parent.label100080297.caption=achievement.cno
this.parent.label120080297.caption=course.cname
this.parent.text10080297.readonly=.f.
this.parent.text10080297.value=achievement.achievement
this.parent.text10080297.readonly=.t.
this.parent.check10080297.readonly=.f.
if student.ifnation=.t.
this.parent.check10080297.value=.t.
else
this.parent.check10080297.value=.f.
endif
this.parent.check10080297.readonly=.t.
this.parent.combo10080297.readonly=.t.
skip
WWWWA 2010-01-06
  • 打赏
  • 举报
回复
应该可以,SQL语句是什么
akejr 2010-01-06
  • 打赏
  • 举报
回复
虽然还是没解决问题,因为就要交了
所以还是谢谢了
WWWWA 2010-01-06
  • 打赏
  • 举报
回复
你在
if (not eof())and (not bof())
之前加入
WAIT WIND TRANS(Reccount())
检查表中是否有记录
十豆三 2010-01-06
  • 打赏
  • 举报
回复
if (not eof())and (not bof())

改为如下试试

If Reccount("ycp1")>0

2,748

社区成员

发帖
与我相关
我的任务
社区描述
VFP,是Microsoft公司推出的数据库开发软件,用它来开发数据库,既简单又方便。
社区管理员
  • VFP社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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