A
Andy Williams
I'm trying to open a comma delimited text file using the following code, but
no luck...
Dim cn As OleDbConnection = New
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\monkey.txt;Extended Properties=""text;HDR=no;FMT=Delimited""")
Dim cmd As OleDbCommand = New OleDbCommand("SELECT * FROM c:\monkey.txt",
cn)
cn.Open()
Dim rdr As OleDbDataReader
rdr = cmd.ExecuteReader
Do While rdr.Read()
Debug.Write(rdr.Item(0))
Loop
cn.Close()
What am I missing?
TIA -Andy
btw, I'm a SQL Server guy, so I'm a bit out of my league here...
no luck...
Dim cn As OleDbConnection = New
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\monkey.txt;Extended Properties=""text;HDR=no;FMT=Delimited""")
Dim cmd As OleDbCommand = New OleDbCommand("SELECT * FROM c:\monkey.txt",
cn)
cn.Open()
Dim rdr As OleDbDataReader
rdr = cmd.ExecuteReader
Do While rdr.Read()
Debug.Write(rdr.Item(0))
Loop
cn.Close()
What am I missing?
TIA -Andy
btw, I'm a SQL Server guy, so I'm a bit out of my league here...