Uploaded image for project: 'Development'
  1. Development
  2. DEV-7854

New installs using localdb instance of demo data may error with "Invalid column name HR_Staff.ActiveLogIn" when logging in.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Failed Testing
    • Priority: Backlog
    • Resolution: Done
    • Affects Version/s: 07.02.00.00
    • Fix Version/s: 07.02.02.00
    • Component/s: General
    • Labels:
      None

      Description

      If there is no JiwaConnections.xml in the folder %appdata%\Roaming\Jiwa Financials and there is also no JiwaConnectionsTemplate.xml in the Jiwa installation folder, the system will attempt to create a new demo database using localDb and setup a new JiwaConnections.xml with a connection named "JiwaDemo" pointing to that database.

      However, after copying the JiwaDemo_Primary.mdf to the localDb folder location, a subsequent step of setting permissions is incorrectly using the 'grant_all_user_tables' stored procedure which causes an exception, resulting in no connection being created and the database not having the required permissions set.

      If the user then manually creates a connection to the demo database on (localdb)\mssqllocaldb, the error "Invalid column name HR_Staff.ActiveLogIn" will occur because the initial read of HR_staff fails due to no permissions, so we then try to connect using the old structure of HR_Staff in an attempt to obtain the version number of the database in preparation of what would be a more meaningful error.

      Workaround is after manually creating the connection in this scenario to run the following against the database:

      usp_Jiwa_Grant_Application_Permissions 'JiwaUser'
      GO
      
      usp_Jiwa_Grant_Reporting_Permissions 'JiwaReports'
      GO
      
      Steps to repro
      1. Delete JiwaConnections.XML from %appdata%\Roaming\Jiwa Financials
      2. Delete JiwaConnectionsTemplate.xml in the Jiwa installation folder
      3. Connect using Management Studio to server (localdb)\mssqllocaldb (use Windows Authentication) and delete the JiwaDemo database
      4. If it exists, delete JiwaDemo_Primary.mdf (and .ldf if exists) from %appdata%\Local\Microsoft\Microsoft SQL Server Local DB\Instances\MSSQLLocalDB
      5. Run Jiwa - note progress dialog opens immediately informing of first time setup progress
      6. Connection is not created - should have been
      7. Manually creating a connection to (localdb)\mssqllocaldb for database JiwaDemo will result in the reported error when connecting.

        Attachments

        1. image-2019-10-31-10-31-15-101.png
          412 kB
          Julie Hanlon
        2. error2.log
          13 kB
          Julie Hanlon
        3. error1.log
          13 kB
          Julie Hanlon
        4. image-2019-10-31-10-21-37-535.png
          40 kB
          Julie Hanlon
        5. image-2019-10-31-10-19-55-318.png
          45 kB
          Julie Hanlon
        6. image-2019-10-31-10-17-48-236.png
          39 kB
          Julie Hanlon

          Issue Links

            Activity

              People

              • Assignee:
                mikes@jiwa.com.au Mike Sheen
                Reporter:
                mikes@jiwa.com.au Mike Sheen
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: