Microsoft.Jet.OLEDB.4.0 and CSV files

  • Thread starter Thread starter toby
  • Start date Start date
T

toby

I'm using the Jet OLE DB provider to select data out of a .csv file
into a dataset.

'----------------------------------------------------------------------
Dim ConnectionString As String = _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\path\to\file;Extended
Properties=""Text;HDR=NO;"""

Dim Conn As New System.Data.OleDb.OleDbConnection(ConnectionString)
Conn.Open()
Dim da As New System.Data.OleDb.OleDbDataAdapter("SELECT * FROM
TXT#csv", Conn)
da.Fill(oDataset, "DataTableName")
Conn.Close()
'-----------------------------------------------------------------------

It's working great for me, but I'm not so sure it'll work for my
users. To use this functionality, do you only have to have the
framework installed, or do you need MDAC installed also? Thanks.
 
On 5 Aug 2003 11:57:13 -0700, (e-mail address removed) (toby) wrote:

¤ I'm using the Jet OLE DB provider to select data out of a .csv file
¤ into a dataset.
¤
¤ '----------------------------------------------------------------------
¤ Dim ConnectionString As String = _
¤ "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\path\to\file;Extended
¤ Properties=""Text;HDR=NO;"""
¤
¤ Dim Conn As New System.Data.OleDb.OleDbConnection(ConnectionString)
¤ Conn.Open()
¤ Dim da As New System.Data.OleDb.OleDbDataAdapter("SELECT * FROM
¤ TXT#csv", Conn)
¤ da.Fill(oDataset, "DataTableName")
¤ Conn.Close()
¤ '-----------------------------------------------------------------------
¤
¤ It's working great for me, but I'm not so sure it'll work for my
¤ users. To use this functionality, do you only have to have the
¤ framework installed, or do you need MDAC installed also? Thanks.

You will likely also need the Jet install (w/the Text ISAM driver):

http://support.microsoft.com/?KBID=282010


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Back
Top