我把msflexgrid与数据库关联了有一项是要查找我想通过筛选以后还放在msflexgrid中要怎么要才能做到啊?

解决方案 »

  1.   

    rs.open "select * from tablename where ...",conn,adopenkeyset,adlockreadonly
    set msflexgrid.datasource=rs
      

  2.   

    来晚了。Leftie(左手) 已经搞定了。
      

  3.   

    if rs.state=adstateopen then rs.close
    rs.open "select 名字,学号,备注 from 学生数据 where 名字='王五'",conn,adopenkeyset,adlockreadonly
    set msflexgrid.datasource=rs
    set rs=nothing
      

  4.   

    工程--->引用--->Microsoft ActiveX Data Object 2.x(版本号)    Dim CN   As New ADODB.Connection                '定义数据库的连接
        Dim Rs   As New ADODB.Recordset
      

  5.   

    if rs.state=adstateopen then rs.close
    rs.open "select 名字,学号,备注 from 学生数据 where 名字='王五'",conn,adopenkeyset,adlockreadonly
    set msflexgrid.datasource=rs
    set rs=nothingLeftie(左手)说的对。
      

  6.   

    工程--->引用--->Microsoft ActiveX Data Object 2.x(版本号)
    可是我引用后他说我名称与已存在的模块,工程或对象冲突!
      

  7.   

    后面那些参数干嘛用的啊,conn,adopenkeyset,adlockreadonly