Results 1 to 3 of 3

Thread: Connection String Issue - Could Not Find Installable ISAM

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2013
    Location
    Minneapolis, MN
    Posts
    531

    Connection String Issue - Could Not Find Installable ISAM

    Hello:

    I have a connection string that works great for reading data from Excel using ADODB:
    Code:
            cn.Open("Provider = Microsoft.ACE.OLEDB.12.0; Data Source = " & ExcelFile & "; Extended Properties = ""Excel 12.0 Macro; HDR=Yes; IMEX=1""; ")

    And I have one I am trying to use to write back, that produces the error 'Could Not Find Installable ISAM'
    Code:
            cn.Open("Provider = Microsoft.ACE.OLEDB.12.0; Data Source = " & ExcelFile & "; ReadOnly = False; Extended Properties = ""Excel 12.0 Macro; HDR=Yes; IMEX=1""; ")
    Both of these reside in the same program. All connection strings are opened and closed in their respective Subs. I'm just a bit baffled!

    Thanks!

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2013
    Location
    Minneapolis, MN
    Posts
    531

    Re: Connection String Issue - Could Not Find Installable ISAM

    I have updated my connection string to this:

    Code:
            cn.Open("Provider = Microsoft.ACE.OLEDB.12.0; Data Source = " & ExcelFile & "; Extended Properties = ""Excel 12.0; ReadOnly = False; HDR=Yes; IMEX=0""; ")
    Now the program just hangs and does nothing.

    Full code below:
    Code:
        Private Sub ReadProps()
            Dim ExcelFile As String = "U:\Steve A\VS_Projects\SWExtractCutlist_Rev4\migrationcheck.xlsx"
            Dim ExcelFileSheetName As String = "ado_dataset"
    
            Dim cn As ADODB.Connection = New ADODB.Connection
            ' Could not find installable ISAM
            cn.Open("Provider = Microsoft.ACE.OLEDB.12.0; Data Source = " & ExcelFile & "; Extended Properties = ""Excel 12.0; ReadOnly = False; HDR=Yes; IMEX=0""; ")
    
            Dim sql As String = "SELECT [Drawing], [Verified] FROM [" & ExcelFileSheetName & "$] "
            Dim rs As ADODB.Recordset = New ADODB.Recordset
    
            rs.Open(sql, cn, CursorTypeEnum.adOpenKeyset, LockTypeEnum.adLockOptimistic, CommandTypeEnum.adCmdText)
            Dim rows As Integer = rs.RecordCount
    
            rs.MoveFirst()
    
            For c As Integer = 0 To rows - 1
                Dim Model As String = rs.Fields("Drawing").Value
                Dim FullPath As String = SearchVaultFile(System.IO.Path.GetFileName(Model))
                txtTopLevelAssembly.Text = "Verifying " & c & ": " & FullPath
    
                Dim VFile As IEdmFile5 = VAULT.GetFileFromPath(FullPath)
                GetLatest(FullPath)
    
                Dim inst As IEdmEnumeratorVariable8
    
                ' If process already matches, skip...
                Dim retval As String = ""
                Dim CheckProcess As String
    
                inst = VFile.GetEnumeratorVariable
                inst.GetVar("PROCESS", "@", retval)
                CheckProcess = retval
    
                rs.Fields("Verified").Value = CheckProcess
    
            Next
    
            rs.Close()
            cn.Close()
    
            MessageBox.Show("Read Props Process Complete...")
            txtTopLevelAssembly.Text = SearchVaultFile(System.IO.Path.GetFileName(txtSearch.Text))
    
        End Sub

  3. #3
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,597

    Re: Connection String Issue - Could Not Find Installable ISAM

    I'm not sure of the behavior of ADODB in newer jet engine.
    I would suggest using System.Data.OleDb.OleDbConnection
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width