Public adoConn As New ADODB.Connection 

  Private Sub csv() adoConn.ConnectionString = "Driver={Microsoft Text Driver (*.txt; *.csv)};DefaultDir=C:\Documents and Settings\vinsonlu\Desktop\1400004" adoConn.Open() Dim rs As New ADODB.Recordset rs.Open("select * from Orders_N.csv", adoConn, ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockReadOnly) If rs.RecordCount > 0 Then rs.MoveFirst() While Not rs.EOF MessageBox.Show(CStr(rs.Fields(1).Value)) rs.MoveNext() End While End If rs.Close() End Sub

 

posted on 2014-02-14 14:53  vinsonLu  阅读(9096)  评论(0编辑  收藏  举报