- 积分
- 2265
- 明经币
- 个
- 注册时间
- 2003-12-8
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2011-4-13 15:01:02
|
显示全部楼层
本帖最后由 wylong 于 2011-4-13 15:02 编辑
Sub tt()
On Error GoTo err_tag
Dim con As New ADODB.Connection
Dim rec As New ADODB.Recordset
con.Open "provider=microsoft.jet.oledb.4.0;data source=d:\1111111111111.MDB", "", "", -1
rec.Open "select zl,mph from mzfw", con, adOpenDynamic, adLockOptimistic, adCmdText
rec.MoveFirst
While Not rec.EOF
Dim str As String
Dim str2 As String
Dim arr() As String
Debug.Print
str = rec.Fields("zl")
str2 = rec.Fields("mph")
rec.MoveNext
Wend
rec.Close
con.Close
Exit Sub
err_tag:
MsgBox "df"
End Sub
|
|