This can be accomplished by comparing the hard coded FE database serial number stored as a constant in your code, to the serial number retrieved from the connected client database. The sample code below shows how you can access the database serial number from the FE database.

VB Code snippet:
Private Function GetFE_Serial(oSC As IBBSessionContext) As String
    Dim oGI As CGeneralinfo
    
On Error GoTo err
    Set oGI = New CGeneralinfo
    With oGI
        .Init oSC
        .Load
        GetFE_Serial = .Fields(GENERALINFO7_fld_SERIALNUMBER)
    End With
    If Not oGI Is Nothing Then
        Set oGI = Nothing
    End If

err:
    If err.Number <> 0 Then
        err.Clear
    End If

End Function


C # Code snippet:
    With New CGeneralinfo
       .Init(SessionContext)
       .Load()
        Return .Fields(EGENERALINFO7Fields.GENERALINFO7_fld_SERIALNUMBER).ToString

Disclaimer: We provide programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes you are familiar with Microsoft Visual Basic and the tools used to create and debug procedures. Our Customer Support can help explain the functionality of a particular procedure, but we will not modify, or assist you with modifying, these examples to provide additional functionality. If you are interested in learning more about the VBA and API modules, contact your account manager.