您的位置:程序门 -> vb -> 基础类



我是一个新手,请大家帮忙


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


我是一个新手,请大家帮忙
发表于:2007-02-28 15:50:23 楼主
我在加载如下一个窗体
private   sub   form_load()                             '窗体载入
    dim   sql1   as   string
    dim   i   as   integer
    dim   conn   as   adodb.connection
    dim   rs1   as   adodb.recordset
    set   conn   =   new   adodb.connection
    set   rs1   =   new   adodb.recordset
    dim   sconnstring   as   string
    sconnstring   =   "provider=microsoft.jet.oledb.4.0;data   source= "   &   app.path   &   "\data.mdb "
    conn.open   sconnstring
    sql1   =   "select   distinct   txtserisname   from   picture "
    rs1.open   sql1,   conn,   3,   3
    i   =   0
    while   not   rs1.eof
        cboserisname.list(i)   =   rs1( "txtserisname ")
        rs1.movenext
        i   =   i   +   1
    wend
    cboserisname.text   =   cboserisname.list(i   -   1)
但一运行,cpu使用率就100%了.就无法进行下去了,但运行别的vb程序就没事,请问是怎么回事啊?
发表于:2007-02-28 15:58:401楼 得分:0

while   not   rs1.eof
        cboserisname.list(i)   =   rs1( "txtserisname ")
        rs1.movenext
        i   =   i   +   1
wend
的前面加上rs1.movefirst


快速检索

最新资讯
热门点击