VB 如何将以下的代码转换为ado代码??

[复制链接]
查看11 | 回复1 | 2009-7-28 13:51:48 | 显示全部楼层 |阅读模式
Private Sub DataGrid1_Click()
Adodc2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\DATA_REF\db1.mdb;Persist Security Info=False"
Adodc2.RecordSource = "select * from wz_jink" & " where 物资代码 ='" & zh(1) & "'"
Adodc2.Refresh
zh(1) = Adodc1.Recordset(1)
End Sub
Private Sub Form_Load()
With Adodc1
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\DATA_REF\db1.mdb;Persist Security Info=False"

Adodc1.RecordSource = "select * from wz_BM" & _

" where 检索代码 >='" & "" & "'" & " order by 检索代码"

Adodc1.Refresh
End With
End Sub

回复

使用道具 举报

千问 | 2009-7-28 13:51:48 | 显示全部楼层
这不就是ADO代码吗?怎么转换?...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行