Announcement

Collapse
No announcement yet.

Failure calling Commit API initialization from VBA

Collapse
X
 
  • Filter
  • Time
Clear All
new posts

    Failure calling Commit API initialization from VBA

    Has something changed in the API lately?

    The code below has been working flawlessly for months and months. It has not been modified. Suddenly it stopped working. Am thinking maybe a recent Commit app update changed something.

    The failure is on the CmtInitDbQryDll line. Status code = 0, no further info.

    CommitAPI_AppName = "CSPBilling"
    C_DBPath = "\\edc-commitcrm\CommitCRM\Db"

    On Error Resume Next
    Dim status As Integer
    Dim bufError As String * C_ErrorDescSize
    Call CmtInitDbQryDll(CommitAPI_AppName, C_DBPath, status)
    If status <> C_Ok Then
    Call CmtGetDescriptionByStatus(status, C_ErrorDescSize, bufError)
    MsgBox "Commit Query Init failed. Status Error code: " _
    & status & Chr(13) & Chr(10) & bufError
    Exit Sub
    Else
    Call CmtInitDbEngDll(CommitAPI_AppName, C_DBPath, status)
    If status <> C_Ok Then
    Call CmtGetDescriptionByStatus(status, C_ErrorDescSize, bufError)
    MsgBox "Commit Engine Init failed. Status Error code: " _
    & status & Chr(13) & Chr(10) & bufError
    CmtTerminateDbQryDll
    Exit Sub
    End If
    End If

    (Sorry for the bad formatting, the indenting keeps getting removed.)

    Any advice will be greatly appreciated!

    -- Craig

    Re: Failure calling RangerMSP API initialization from VBA

    Thanks for asking. Nope, nothing should have changed here and from what you described this has been working and suddenly stopped working. If you just upgraded today and it stopped working today then it may be related to not using the latest API files and dlls, however, if you upgraded a while back, have been using it for a while and it suddenly stopped working then it has to be something external. Verify that you have all relevant files, that the user running the program developed on top of the API has full access rights to all files involved (your custom program files, all related API files, and the entire RangerMSP folder tree on the server).

    Hope this makes sense and helps.

    Comment


      Re: Failure calling Commit API initialization from VBA

      Update happened a while ago so it wasn't recent. I'll check on the items you listed. Thanks for the quick response.

      Comment


        Re: Failure calling Commit API initialization from VBA

        The last update was applied approximately a month ago. This app is only run monthly so it might have worked just prior to the update and now fails after. Not certain about that.

        However, we have several other apps that are used daily and they all work fine.

        Regarding the user account, same observation -- other apps remain working and this one used to, so this should not be a permissions issue.

        This is the contents of the \\edc-commitcrm\CommitCRM\ThirdParty\UserDev folder:

        12/18/2015 01:27 AM 1,685,456 ace32.dll
        09/19/2014 08:06 PM 50 ads.ini
        12/18/2015 01:35 AM 1,972,176 adsloc32.dll
        05/13/2007 01:59 PM 2,417 adslocal.cfg
        09/20/2013 10:10 AM 25,152 Ansi.chr
        12/18/2015 01:26 AM 231,376 axcws32.dll
        10/15/2018 04:54 PM 4,935,472 CmtDbEng.dll
        10/15/2018 04:54 PM 2,248,496 CmtDbQry.dll
        09/20/2013 09:10 AM 25,152 OldVer_Ansi-03182019-111846.chr
        09/20/2013 09:10 AM 25,152 OldVer_Ansi-03272019-120233.chr

        Does this look right?

        It would be handy to either get a more detailed error response from the CmtInitDbQryDll call, or perhaps some log entries? Is any of this activity logged?

        -- Craig

        Comment


          Re: Failure calling RangerMSP API initialization from VBA

          Thanks for providing the additional info.
          Yes, all these looks perfect and the fact that you have other custom apps that are based on RangerMSP's API means that the system seams to be working well.
          Please ZIP the content of \RangerMSP\Logs and share it with us over email/dropbox/drive. We will then try to figure out whether anything else is logged there.

          Hope this helps.

          Comment


            Re: Failure calling Commit API initialization from VBA

            Thanks. I've got the log files zip'd. Which email address to send the link? Do you want the LogsUserLog_.TXT file in the root folder?

            Comment


              Re: Failure calling RangerMSP API initialization from VBA

              Support@
              With ALL files in this folder.

              Comment


                Re: Failure calling Commit API initialization from VBA

                OK, it's 574,005 KB! Not sure I'll be able to upload this but I'll try.

                Comment


                  Re: Failure calling RangerMSP API initialization from VBA

                  Oh, that's too big, not expected.
                  You can delete any log file older than 45 days.

                  Comment


                    Re: Failure calling Commit API initialization from VBA

                    Email with a link is on it's way.

                    Comment


                      Re: Failure calling RangerMSP API initialization from VBA

                      We have just replied you by email with all of the relevant information.

                      In short, we suspect that this specific custom application does not use the latest DLL files as it points to the local folder instead of the recommended RangerMSP\ThirdParty\UserDev folder.

                      Please keep us posted.

                      Comment


                        Re: Failure calling Commit API initialization from VBA

                        Oh, right – Access VBA will not load .DLL from network shares. The copy of the .dll could be out of date, I’ll make a prominent note about that in the app.

                        Unfortunately even after copying all of the files from the source folder to the local workstation, the same error occurs in the same place. Any other ideas?

                        Comment

                        Working...
                        X