分享

用表格控件输出查询结果

 happyngkmw 2012-07-15
发表于:2004-11-02 21:06:15
用表格控件输出查询结果,总是先在浏览窗口中显示查询结果,关掉浏览窗口,结果再显示在表格控件中.
代码为:
xh= " "
xh=allt(thisform.text1.value)
thisform.grid1.recordsourcetype=4
thisform.grid1.recordsource= "select   *   from   xs   where   学号=xh   into   corsor   xs1 "
thisform.grid1.refresh  
请帮我改改,谢谢!

#1楼 得分:0回复于:2004-11-02 21:10:41
xh= " "
xh=allt(thisform.text1.value)
thisform.grid1.recordsourcetype=4
thisfrom.grid1.recordsource= ' '
select   *   from   xs   where   学号=xh       &&在浏览窗口显示结果
thisform.grid1.recordsource= "select   *   from   xs   where   学号=xh   into   corsor   xs1 "
thisform.grid1.refresh

回复于:2004-11-02 21:15:21
对了,你上面的临时表CORSOR应为CURSOR


#3楼 得分:0回复于:2004-11-02 21:15:40
我想要直接在表格控件中显示,不要浏览窗口出现


#4楼 得分:0回复于:2004-11-02 21:18:39
那把这个去掉好了:(select   *   from   xs   where   学号=xh       &&在浏览窗口显示结果)
xh= " "
xh=allt(thisform.text1.value)
thisform.grid1.recordsourcetype=4
thisfrom.grid1.recordsource= ' '
thisform.grid1.recordsource= "select   *   from   xs   where   学号=xh   into   cUrsor   xs1 "
thisform.grid1.refresh

#5楼 得分:0回复于:2004-11-02 21:18:48
谢谢小丑,你不介意吧!我的结果出来了,就是CURSOR的错

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多