Help with pkg Solution Wizard, split db and Runtime deployment

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tkowlet
    New Member
    • Jan 2010
    • 4

    Help with pkg Solution Wizard, split db and Runtime deployment

    My app is a MS Access 2007, which I have split into FE and BE (ACCDE and _be.ACCDB). I am using the Package Solution Wizard and have selected to "Require nothing and install the Access 2007 Runtime," providing the source of the AccessRuntime on my computer. If I use a destination folder other than ProgramFiles, I get an error message after installing the app on "some but not all" of my controls.
    Error message: "C:\ProgramFile s\Foldername\Da tabaseName_be.a ccdb is not a valid path. Make sure it is spelled correctly and that you are connected to the server on which the file resides." My understanding is that this message cannot be valid since this should be a stand-alone app. I added the backend ( _be.accdb ) file in the Additional files options of the wizard and also have its source in the same folder as the Frontend db.

    I finally got it to work for a Windows XP operating system by putting my app folder in ProgramFiles before I deployed it. But this did not work for the Vista or Windows 7 OS as it looked in the ProgramFiles but the app installed in the ProgramFiles (X86) and it apparently did not recognize this. Then I tried putting my app folder in ProgramFiles(86 ) so it could find the path and now the Package Solution Wizard says it cannot open or access ProgramFiles on my last step of deployment (after clicking the final OK) and thus it does not create a package! I am logged in as the Administrator and am the only user.

    Anyone else have this problem or have a made some glaring error that I am missing? The computers with the Vista and Windows 7 OS both have Access 2007 installed on them. Is that a problem?
  • nico5038
    Recognized Expert Specialist
    • Nov 2006
    • 3080

    #2
    Placing your app in another folder will need a relink of the tables.
    Personally I do this from code like:
    Code:
    Function fncRelink()
    'function to relink tables to the "_be" database
    'It's assumed that the "_be" database is in the same folder as the frontend !
    
    Dim td As DAO.TableDef
    Dim fld As DAO.Field
    
    For Each td In CurrentDb.TableDefs
      If Len(td.Connect) > 0 Then
         td.Connect = ";DATABASE=" & Left(CurrentDb.Name, InStrRev(CurrentDb.Name, "\")) & Mid(td.Connect, InStrRev(td.Connect, "\") + 1)
         td.RefreshLink
      End If
    Next
       
    End Function
    But (as stated in the comment) the _be needs to be in the same foilder !

    Nic;o)

    Comment

    • tkowlet
      New Member
      • Jan 2010
      • 4

      #3
      Nico5038- Thanks for the suggestion. I did relink my db's after moving the files and they are in the same folder. After this is packaged for deployment and installed on someone else's computer, would they need to relink the db's? If so not very user friendly.

      The install package works on the XP computer but not on the Vista or Windows7 and I wonder if it has something to do with trusted location and macros.

      Comment

      • nico5038
        Recognized Expert Specialist
        • Nov 2006
        • 3080

        #4
        I personally have used the last time a third party (free) packager and left the Microsoft packager "as is".

        Relinking will always be necessary when the database is installed in a different folder, thus I offer a relink button on my logon form executing my above code.

        I would check another installer and make sure that besides the .accdb (FE and BE) also the 2007 runtime is included (check your references for other needed dll's).
        I found a collection of installers at http://www.freedownloadmanager.org/d...ager_software/

        Nic;o)

        Comment

        • tkowlet
          New Member
          • Jan 2010
          • 4

          #5
          Nico5038 - I appreciate the follow-up and link to free installer pkgs. After reading further on split databases I understand better the need for your code that you offered. However I do get an error and wonder if I need to add additional code or perhaps it is the need for additional dll's you mentioned. I am not sure how to go about checking for references for other needed dll's but I will look into that next.

          Here is the code I wrote following your example and the error message is the first "td.connect ," saying the "methor or member is not found."
          Function fncRelink()

          Dim td As DAO.TableDefs
          Dim fld As DAO.Field

          For Each td In CurrentDb.Table Defs
          If Len(td.Connect]) > 0 Then
          td.Connect = ",DATABASE= " & Left(CurrentDb. Name, InStrRev(Curren tDb.Name, "\")) _
          & Mid(td.Connect, InStrRev(td.Con nect, "\") + 1)
          td.RefreshLink
          End If
          Next


          End Function

          Thanks for the help and I will pursue the leads you have provided.
          TKowlet

          Comment

          • nico5038
            Recognized Expert Specialist
            • Nov 2006
            • 3080

            #6
            There's an obsolete bracket in "If Len(td.Connect]) > 0 Then" it should be:
            "If Len(td.Connect) > 0 Then"

            The references can be seen by opening some VBA code under the menu option Tools / References. The checked references are the ones needed and the mandatory ones will be handled by the runtime environment.
            When you have been playing with ActiveX controls there might be unnecessary references, I always test it by removing them and performing a compile to see or the code is OK. When I get an error I reset the check :-)

            Nic;o)

            Comment

            • tkowlet
              New Member
              • Jan 2010
              • 4

              #7
              Nic;o
              Again your info was right on the mark, the linking tables code and references. I checked and changed some of the references and your code worked great. I now have been testing my latest installation packages on the XP OS and it works on both computers, which is a break through! I found I had to deploy from the XP computer, as my Vista OS would not let me use Program files as a destination.

              I know I still have much to learn about deployment and plan to try one of the other packages, but wanted to try out your ideas on the Access Dev Extensions first. Next I will work out deployment with the other operating systems.

              Again thank-you for your patience and your solutions.
              TKowlet

              Comment

              • nico5038
                Recognized Expert Specialist
                • Nov 2006
                • 3080

                #8
                Glad it worked out fine :-)

                Success with your application !

                Nic;o)

                Comment

                Working...