Microsoft.Jet.OLEDB.4.0 and CSV files

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.
 
P

Paul Clement

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top