EDN Admin
Well-known member
Hi Team
In my application, I am importing a csv file into access database.
I am getting " Could not find installable ISAM " error. Crawl through the internet to find the solution, still not joy.
<span style="text-decoration:underline Platform I am using:
- Visual Studio 2012 Professional<br/>
- Access 2010<br/>
- Installed - "Mircrosoft Access Database Engine 2010 Redistributable" for 32 bits as Access 2010 I have got on my machine is 32 bit.
<span style="text-decoration:underline Please see the code below:
<pre class="prettyprint lang-vb OpenFileDialog.ShowDialog()
MessageBox.Show(OpenFileDialog.FileName)
MessageBox.Show(OpenFileDialog.SafeFileName)
MessageBox.Show(System.IO.Path.GetDirectoryName(OpenFileDialog.FileName))
Dim AccessConn As New System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|Databasedb_analytics.accdb;Persist Security Info=True")
AccessConn.Open()
Dim AccessCommand As _
New System.Data.OleDb.OleDbCommand("SELECT * INTO [other1] FROM [csv;DATABASE=" & System.IO.Path.GetDirectoryName(OpenFileDialog.FileName) & ";HDR=Yes].[" & _
OpenFileDialog.SafeFileName & "]", AccessConn)
AccessCommand.ExecuteNonQuery() ---->Getting Error Here
AccessConn.Close()[/code]
Please do give me a hand, if I am missing something very obvious here.
Really appreciate your time and effort to read and help.
Kiind regards
Sap
View the full article
In my application, I am importing a csv file into access database.
I am getting " Could not find installable ISAM " error. Crawl through the internet to find the solution, still not joy.
<span style="text-decoration:underline Platform I am using:
- Visual Studio 2012 Professional<br/>
- Access 2010<br/>
- Installed - "Mircrosoft Access Database Engine 2010 Redistributable" for 32 bits as Access 2010 I have got on my machine is 32 bit.
<span style="text-decoration:underline Please see the code below:
<pre class="prettyprint lang-vb OpenFileDialog.ShowDialog()
MessageBox.Show(OpenFileDialog.FileName)
MessageBox.Show(OpenFileDialog.SafeFileName)
MessageBox.Show(System.IO.Path.GetDirectoryName(OpenFileDialog.FileName))
Dim AccessConn As New System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|Databasedb_analytics.accdb;Persist Security Info=True")
AccessConn.Open()
Dim AccessCommand As _
New System.Data.OleDb.OleDbCommand("SELECT * INTO [other1] FROM [csv;DATABASE=" & System.IO.Path.GetDirectoryName(OpenFileDialog.FileName) & ";HDR=Yes].[" & _
OpenFileDialog.SafeFileName & "]", AccessConn)
AccessCommand.ExecuteNonQuery() ---->Getting Error Here
AccessConn.Close()[/code]
Please do give me a hand, if I am missing something very obvious here.
Really appreciate your time and effort to read and help.
Kiind regards
Sap
View the full article