Results 1 to 2 of 2
  1. #1
    jerem is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2012
    Posts
    88

    Could Not Find Installable Isam


    Hi,

    I have got a database with linked tables to SQL Server. I would like to use below string to connect to my tables without DSN. I know the string works as if I make a test using the ADODB.Recordset, it connects and returns the result of my test query.
    But I use it to connect to tables, I get the "Could not find installable ISAM" error. Can anybody help?

    String
    Code:
    "Provider=SQLOLEDB.1;Persist Security Info=False;" & _
                 "User ID=%UserID%;password=%PassWord%;Initial Catalog='%DataBase%';Data Source=%Source%;" & _
                 "Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Connect Timeout=100000;"
    
    Procedure
    Code:
    Function testconncetion()
        Call AttachDSNLessTable("dbo_TB Company", "dbo.TB Company")
    End Function
    
    Function AttachDSNLessTable(stLocalTableName As String, stRemoteTableName As String, stServer As String, Optional stUsername As String, Optional stPassword As String)
        On Error GoTo AttachDSNLessTable_Err
        Dim td As TableDef
        Dim stConnect As String
    
        For Each td In CurrentDb.TableDefs
            If td.Name = stLocalTableName Then
                CurrentDb.TableDefs.Delete stLocalTableName
            End If
        Next
            stConnect = "Provider=SQLOLEDB.1;Persist Security Info=False;" & _
                 "User ID=%User ID%;password=%PassWord%;Initial Catalog=%DataBase%;Data Source=%Source%;" & _
                 "Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Connect Timeout=100000;"
        Debug.Print stConnect
        Set td = CurrentDb.CreateTableDef(stLocalTableName, dbAttachSavePWD, stRemoteTableName, stConnect)
        CurrentDb.TableDefs.Append td
        AttachDSNLessTable = True
        Exit Function
    
    AttachDSNLessTable_Err:
    
        AttachDSNLessTable = False
        MsgBox "AttachDSNLessTable encountered an unexpected error: " & Err.Description
    
    End Function
    
    Cross
    http://www.access-programmers.co.UK/forums...951#post1365951

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    maybe I'm missing something here, but your function is expecting 5 variables
    stLocalTableName (you are passing it "dbo_TB Company")
    stRemoteTableName (you are passing it "dbo_TB Company")
    stServer (not passing a variable)
    stUsername (optional value - never tried to use this do you have to provide a , to note you are intentionally leaving it blank?
    stPassword (optional value - same note as above)

    In essence you are requiring three variables to be passed but only giving it 2?

    Where in the code is this crashing?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 04-20-2014, 11:54 AM
  2. Replies: 1
    Last Post: 11-06-2013, 09:46 AM
  3. Could not find installable isam
    By Gee in forum Access
    Replies: 0
    Last Post: 03-14-2013, 11:58 AM
  4. ISAM not found
    By amerifax in forum Access
    Replies: 2
    Last Post: 02-02-2013, 06:48 PM
  5. Replies: 0
    Last Post: 06-29-2010, 07:32 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums