Import CSV file in datagridview with dialogbox

idw1969

New member
Joined
Feb 20, 2008
Messages
1
Programming Experience
Beginner
I now use the code below to read in c:\test.csv into the mdb table projectgegevens :

Dim AccessCommand As New System.Data.OleDb.OleDbCommand("Insert into projectgegevens Select * FROM [Text;DATABASE=c:\].[Test.csv]", AccessConn)

I now want to replace c:\text.csv for a variable called "File" (this comes out of a openfiledialogbox)

I don't get it to work

Please can someone help me

Thanx
 
Last edited:
Back
Top