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
vinson