最好写几句话示范一下,谢谢

解决方案 »

  1.   

    dim con as adodb.connection
    dim rs as adodb.recordset
    dim strCon as string
    dim strSQL as stringset con = new adodb.connection
    set rs = new adodb.recordsetstrSQL ="select * from tableName;"strCon ="provider=microsoft.jet.oledb.4.0;" & _
            "datasource=数据库路径;" & _
            "jet oledb:database passwore=数据库密码"con.open strCon
    rs.open strSQL,con,adopenstatic
    '把查询结果显示在MSHFlexGrid1控件里
    set MSHFlexGrid1.datasource = rs
    rs.close
    con.close
    set rs = nothing
    set con = nothing'使用这段代码得先引用ADO.
      

  2.   

    dim rec as new adodb.recordset
    dim cnn as new adodb.connection
    dim str as string
    str="select ..."
    rec.open str,cnn
      

  3.   

    str="delete ..."
    cnn.execute str
      

  4.   

    MSDN和ADO2.5里有ADO的帮助,中文的,CHM格式你找找看,叫什么ADO21.CHM,好像是这样的,内容很详细,慢慢看!