I have a CSV file which is delimited by a ~ and I am strugling with VB.Net code to be able to import the CSV file into Access 2007.
My CSV file is located in c:\temp\drv.csv
Database located in c:\temp\drv.accdb
I have been searching on google for sometime now and can't find the solution, any help would be really apreshiated.
Code so far, but this does not work:
Thanks in advance
Simon
My CSV file is located in c:\temp\drv.csv
Database located in c:\temp\drv.accdb
I have been searching on google for sometime now and can't find the solution, any help would be really apreshiated.
Code so far, but this does not work:
VB.NET:
Dim myConn As OleDb.OleDbConnection
myConn = New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Temp\DRV.accdb;Persist Security Info=False;")
Dim cmd As New OleDb.OleDbCommand("INSERT INTO drv_data (link_ID,drv_type,drv_text) SELECT * FROM [Text;Database=C:\Temp;Hdr=No].[C:\temp\drv.csv]", myConn)
myConn.Open()
cmd.ExecuteNonQuery()
myconn.Close()
Thanks in advance
Simon