vfp大神请进,我想用grid显示查询内容,但是点查询按钮后grid里总是空白的

2025-05-13 17:30:23
推荐回答(1个)
回答(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

再试试