Import/Export from/to Access using vb.net using OLEDB creates "Bookmark error"
<p>This is driving me nuts:</p>

<p>I have an Access table defined like this:</p>

<pre><code>CustomerName - ShortText
CountryCode - ShortText
Category - ShortText
ProductType - ShortText
ProductNumber - ShortText
ProductDescription - ShortText
PageReferenceVolume - Number (long Integer)

PK: CustomerName, CountryCode, ProductNumber
</code></pre>

<p>I have a vb.net application where I offer the possibility for the user to export the data of this table in an Excel file so he can do bulk update and then import it back into the database.
Because the table can be quite big I have choosen to delete all data and import all data again from Excel.
This is working fine on all tables (I am using this on different places but for the table above I have systematically the first 11 lines either not imported or imported with an error saying "Not a valid bookmark error" 
Any suggestion on why this is happenning?</p>

<p>Here is the code I am using:</p>

<p>Export Sub</p>

<pre><code>Private Sub ExportLinkLabel_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles ExportLinkLabel.LinkClicked
    Dim ProductExportFileName As String = String.Empty
    Dim xlApp As Excel.Application
    Dim xlWorkBook As Excel.Workbook
    Dim xlWorkSheet As Excel.Worksheet
    Dim misValue As Object = System.Reflection.Missing.Value
    Dim i As Int16, j As Int16

    ProductExportFileName = mdlGlobalStuff.sMasterDataPath &amp; "\" &amp; Microsoft.VisualBasic.DateAndTime.Year(Now) &amp; "-" &amp; Microsoft.VisualBasic.DateAndTime.Month(Now) &amp; "-" &amp; Microsoft.VisualBasic.DateAndTime.Day(Now) &amp; " ProductExport.xls"

    xlApp = New Excel.Application
    xlWorkBook = xlApp.Workbooks.Add(misValue)
    xlWorkSheet = xlWorkBook.Sheets("sheet1")
    For Each column As DataGridViewColumn In dgv.Columns
        xlWorkSheet.Cells(1, column.Index + 1) = column.DataPropertyName
    Next
    For i = 0 To dgv.RowCount - 2
        For j = 0 To dgv.ColumnCount - 1
            xlWorkSheet.Cells(i + 2, j + 1) = dgv(j, i).Value.ToString()
        Next
    Next
    Using sfd As New SaveFileDialog
        sfd.FileName = ProductExportFileName 
        If sfd.ShowDialog() = DialogResult.OK Then
            xlWorkBook.SaveAs(sfd.FileName, Excel.XlFileFormat.xlWorkbookNormal, misValue, misValue, misValue, misValue, Excel.XlSaveAsAccessMode.xlExclusive, misValue, misValue, misValue, misValue, misValue)
        End If
        MsgBox(sfd.FileName &amp; vbCrLf &amp; "has been saved successfully")
    End Using
    xlWorkBook.Close(True, misValue, misValue)
    xlApp.Quit()
    releaseObject(xlWorkSheet)
    releaseObject(xlWorkBook)
    releaseObject(xlApp)
End Sub
</code></pre>

<p>Import Sub</p>

<pre><code>Private Sub ImportLinkLabel_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles ImportLinkLabel.LinkClicked
    Dim Delcmd As New OleDbCommand
    Dim sQuery As String = String.Empty
    Dim QueryReturn As Integer = 0
    Dim strFileName As String = String.Empty
    Dim XLda As New OleDbDataAdapter
    Dim ExcelTables As New DataTable

    Try
        OpenFileDialog1.FileName = ""
        OpenFileDialog1.InitialDirectory = mdlGlobalStuff.sMasterDataPath
        OpenFileDialog1.Filter = "Excel|*.xls|All files (*.*)|*.*"
        If OpenFileDialog1.ShowDialog() &lt;&gt; Windows.Forms.DialogResult.OK Then
            Exit Sub
        End If
        strFileName = OpenFileDialog1.FileName
        Try
            Delcmd.Connection = mdlLocalAccDB.accessConn
            Delcmd.CommandType = CommandType.Text
            Delcmd.CommandText = "DELETE * FROM tbl_GenericProducts"
            QueryReturn = Delcmd.ExecuteNonQuery()
            'MsgBox(QueryReturn &amp; " rows deleted")
        Catch ex As Exception
            MsgBox("ImportLinkLabel_LinkClicked: Deleting Data" &amp; vbCrLf &amp; ErrorToString())
            Exit Sub
        End Try
        Dim MyXLConnection As New OleDbConnection("provider=Microsoft.ACE.OLEDB.12.0; Data Source=" &amp; strFileName &amp; ";Extended Properties=Excel 8.0;")
        Using MyXLConnection
            Using cmd As New OleDbCommand
                cmd.Connection = MyXLConnection
                cmd.CommandText = "INSERT INTO [MS Access;Database=InvoicingToolDB.accdb].[tbl_GenericProducts] SELECT * FROM [Sheet1$]"
                If MyXLConnection.State = ConnectionState.Open Then
                    MyXLConnection.Close()
                End If
                MyXLConnection.Open()
                cmd.ExecuteNonQuery()
            End Using
        End Using
        Call InitForm() ' Refresh the form to displayed the newly loaded data
    Catch ex As Exception
        MsgBox("ImportLinkLabel_LinkClicked: Importing Product data" &amp; vbCrLf &amp; ErrorToString())
    End Try
End Sub
</code></pre>

<p>I am copying the first lines data exported by the Export sub above. The first 11 lines are the ones not loaded:</p>

<pre><code>CustomerName    |    CountryCode    |    Category    |    ProductType    |    ProductNumber    |    ProductDescription                           |    PageReferenceVolume
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
VALEO           |    BE             |    BE_TYPE00   |    Type0          |    C5F94AB          |    HP LaserJet Pro M402dn Printer               |    500
VALEO           |    BE             |    BE_TYPE01   |    Type1          |    C5F94A           |    HP LaserJet Pro M402dn Printer               |    952
VALEO           |    BE             |    BE_TYPE02   |    Type2          |    F2A69A           |    HP LaserJet Enterprise M506dn Printer        |    4398
VALEO           |    BE             |    BE_TYPE02   |    Type2          |    F2A66A           |    HP LaserJet Managed M506dnm Printer          |    4398
VALEO           |    BE             |    BE_TYPE03   |    Type3          |    CF236A           |    HP LaserJet Enterprise M712dn                |    3760
VALEO           |    BE             |    BE_TYPE04   |    Type4          |    G1W46A           |    HP PageWide Ent Color Printer 556dn          |    2418
VALEO           |    BE             |    BE_TYPE04   |    Type4          |    C2S11A           |    HP Office jet Enterprise Color X555dn        |    2418
VALEO           |    BE             |    BE_TYPE05   |    Type5          |    D3L09A           |    HP Color LaserJet Enterprise M750dn          |    4212
VALEO           |    BE             |    BE_TYPE06   |    Type6          |    F2A79A           |    HP LaserJet Managed MFP M527dnm Printer      |    4769
VALEO           |    BE             |    BE_TYPE06   |    Type6          |    F2A76A           |    HP LaserJet Ent MFP M527dn Printer           |    4769
VALEO           |    BE             |    BE_TYPE07   |    Type7          |    L3U63A           |    HP LaserJet Managed MFP M725dnm              |    6262
VALEO           |    BE             |    BE_TYPE07   |    Type7          |    CF069A           |    HP LaserJet Ent MFP M725z+                   |    6262
VALEO           |    BE             |    BE_TYPE07   |    Type7          |    CF066A           |    HP LaserJet Ent MFP M725dn                   |    6262
VALEO           |    BE             |    BE_TYPE08   |    Type8          |    L3U42A           |    HP PageWide Managed Color MFP E58650dn       |    5088
VALEO           |    BE             |    BE_TYPE08   |    Type8          |    B5L04A           |    HP Office jet Enterprise Color MFP X585dn    |    5088
VALEO           |    BE             |    BE_TYPE08   |    Type8          |    L3U40A           |    HP Officejet Managed Color MFP X585dnm       |    5088
VALEO           |    BE             |    BE_TYPE08   |    Type8          |    G1W39A           |    HP PageWide Ent Color MFP 586dn              |    5088
VALEO           |    BE             |    BE_TYPE09   |    Type9          |    A2W75A           |    HP Color LaserJet Enterprise flow MFP M880z  |    19117
VALEO           |    BE             |    BE_TYPE09   |    Type9          |    L3U51A           |    HP Color LaserJet Managed Flow MFP M880zm    |    19117
VALEO           |    BR             |    BR_TYPE00   |    Type0          |    C5F94AB          |    HP LaserJet Pro M402dn Printer               |    1150
VALEO           |    BR             |    BR_TYPE01   |    Type1          |    C5F94A           |    HP LaserJet Pro M402dn Printer               |    1005
VALEO           |    BR             |    BR_TYPE02   |    Type2          |    F2A69A           |    HP LaserJet Enterprise M506dn Printer        |    7508
VALEO           |    BR             |    BR_TYPE02   |    Type2          |    F2A66A           |    HP LaserJet Managed M506dnm Printer          |    7508
VALEO           |    BR             |    BR_TYPE03   |    Type3          |    CF236A           |    HP LaserJet Enterprise M712dn                |    3760
VALEO           |    BR             |    BR_TYPE03   |    Type3          |    D3L09A           |    HP Color LaserJet Ent M750dn Printer         |    3760
VALEO           |    BR             |    BR_TYPE03   |    Type3          |    CZ245A           |    HP LaserJet Enterprise M806x+                |    3760
VALEO           |    BR             |    BR_TYPE04   |    Type4          |    C2S11A           |    HP Office jet Enterprise Color X555dn        |    3634
VALEO           |    BR             |    BR_TYPE04   |    Type4          |    G1W46A           |    HP PageWide Ent Color Printer 556dn          |    3634
VALEO           |    BR             |    BR_TYPE06   |    Type6          |    F2A79A           |    HP LaserJet Managed MFP M527dnm Printer      |    5347
</code></pre>