vfp大神请进,我想用grid显示查询内容,但是点查询按钮后grid里总是空白的
查询按钮下命令:setsafetyoffthisform.grid1.recordsource='select*fromcpbwherexih=thisform.text...
查询按钮下命令:set safety off
thisform.grid1.recordsource='select * from cpb where xih=thisform.text1.value into table a'
thisform.grid1.recordsource='a'
thisform.grid1.column1.controlsource='a.bh'
thisform.grid1.column2.controlsource='a.sh'
thisform.grid1.column3.controlsource='a.xah'
thisform.grid1.column4.controlsource='a.xih'
thisform.grid1.column5.controlsource='a.lx'
thisform.grid1.column6.controlsource='a.rkrq'
thisform.grid1.column7.controlsource='a.jyy'
thisform.grid1.refresh
grid1的属性recordsourcetype已改成4
着急,在线等,能解决问题者再加50分奖励,说到做到! 展开
thisform.grid1.recordsource='select * from cpb where xih=thisform.text1.value into table a'
thisform.grid1.recordsource='a'
thisform.grid1.column1.controlsource='a.bh'
thisform.grid1.column2.controlsource='a.sh'
thisform.grid1.column3.controlsource='a.xah'
thisform.grid1.column4.controlsource='a.xih'
thisform.grid1.column5.controlsource='a.lx'
thisform.grid1.column6.controlsource='a.rkrq'
thisform.grid1.column7.controlsource='a.jyy'
thisform.grid1.refresh
grid1的属性recordsourcetype已改成4
着急,在线等,能解决问题者再加50分奖励,说到做到! 展开
1个回答
展开全部
into table a
这里的a有问题
在vfp中,a可巧裤以是孝让简个工作区
例如
select a
可能你认为这个命令的作用是选择a表
可我也可以认为是选择a工作区
这可能并不是导致grid不显示的关键原滑岩因
thisform.grid1.recordsource='select * from cpb where xih=thisform.text1.value into table a'
thisform.grid1.recordsource='a'
这两句修改成
select * from cpb where xih=thisform.text1.value into cursor temp
thisform.grid1.recordsource = 'temp'
thisform.grid1.recordsourcetype = 1
再试试
这里的a有问题
在vfp中,a可巧裤以是孝让简个工作区
例如
select a
可能你认为这个命令的作用是选择a表
可我也可以认为是选择a工作区
这可能并不是导致grid不显示的关键原滑岩因
thisform.grid1.recordsource='select * from cpb where xih=thisform.text1.value into table a'
thisform.grid1.recordsource='a'
这两句修改成
select * from cpb where xih=thisform.text1.value into cursor temp
thisform.grid1.recordsource = 'temp'
thisform.grid1.recordsourcetype = 1
再试试
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询