| 发表于:2007-02-05 14:49:202楼 得分:5 |
首先建议用datagrid 显示数据, data控件不支持office2000的。用ado 给你个例子 你试试吧,好用的 记得要引用ado 你只需要在工程/引用 miscrosoft activex data objects 2.x library 就可以了 dim db as connection dim withevents adoprimaryrs as recordset '数据库连接对象 private sub command1_click() strsql= "select 字段 from 表 where 你的条件 " set db = new connection db.cursorlocation = aduseclient '下面的连接数据字符串你要修改一下 db.open "provider=microsoft.jet.oledb.4.0;data source= " & app.path & "\计划管理系统.mdb;persist security info=false " set adoprimaryrs = new recordset adoprimaryrs.open strsql, db, adopenstatic, adlockoptimistic set datagrid1.datasource = adoprimaryrs end sub | | |
|