BBREAPI7.dll with c# and permission issues

Options
We are creating a donor website for our donors to access their giving history (data in Raisers Edge) and have been using the BBREAPI7.dll successfully to pull the needed data. However we have experienced a major hurdle as the RE user's permissions have to be administrative level rather then a limited permissions set or else we see an error "The Microsoft Jet database engine cannot open the file 'C:\\Program Files (x86)\\Blackbaud\\The Raisers Edge 7\\SYSDB\\re_sys7.mdb'.  It is already opened exclusively by another user, or you need permission to view its data error". RE Support has worked with us to narrow the issue down to the fact that we are coding in c# not vb at which point it is out of their scope of support.


Has anyone else worked with the BBREAPI7.dll in c# or experienced this error?

Comments

  • Did your organization pay for API access? I tried connecting via php COM per an old example, the connection would have worked but RE requires API access, which to my knowledge is an additional $15,000 USD. Also, you have to specify some parameters in your API connection string to authenticate as a non-administrative user.


    CM
  • Thanks for the repyl.


    Yes we did pay for the API access when we contracted RE. We are passing all of the parameters as indicated by the knowledgebase https://kb.blackbaud.com/articles/Article/46269

    REAPI.Init (sSerialNumber As String, [sUserName As String], [sPwd As String], [DatabaseNumber As Long], [sThirdPartyVendor as String], [1AppMode = amStandalone]) As Boolean


    As long as the User designated by the sUersname has administrative permissions in RE then everything works fine. If that user is changed to have limited permissions in RE then we get the error.  I havent found any documentation about the parameters in the API connection string to authenticate as a non-administrative user.  Would you have a link to the documentation?

     
  • It looks like the problem revolved around permissions for my NTFS account on the workstation.   We found that 3 of the folder permissions from this Blackbaud KnowledgeBase (Link) hadnt been set.  Once we set them we no longer received the error message.
  • isaiah ryon:

    Thanks for the repyl.


    Yes we did pay for the API access when we contracted RE. We are passing all of the parameters as indicated by the knowledgebase https://kb.blackbaud.com/articles/Article/46269

    REAPI.Init (sSerialNumber As String, [sUserName As String], [sPwd As String], [DatabaseNumber As Long], [sThirdPartyVendor as String], [1AppMode = amStandalone]) As Boolean


    As long as the User designated by the sUersname has administrative permissions in RE then everything works fine. If that user is changed to have limited permissions in RE then we get the error.  I havent found any documentation about the parameters in the API connection string to authenticate as a non-administrative user.  Would you have a link to the documentation?

     

    You're correct; everything hinges on the permissions of the user specified in the connection string. There is no "administrative parameter" to set. I assume you've experimented with permissions and have hit a dead-end. Obviously, if you can avoid making the connection user a Supervisior, that is preferable. And unfortunately, there isn't an obfuscation of the credentials in the code which is risky if they are.


    Have you tried making the API user a dedicated RE user? We usually create an Applications or ApiUser user profile in RE rather than use an actual user's profile.


    As an aside, the ThirdPartVendor and AppMode parameters can be nothing in this example. The former is only for connecting with a BB API code in place of the serial number and you are using the default for the latter. Standalone mode, btw, enables pop-up messages on any errors, while Server mode supresses these. So we tend to use the latter most of the time.

Categories