New Keywords for Database Type and Database Version Answered

Dave Gutman

Suggest creating B1UP Keywords for Database Type and Database Version.  These might be something like: $[DBTYPE] and $[DBVERSION].  This would be very helpful when code needs to work in both databases but requires database-specific syntax.

For example:
IF $[DBTYPE] = 'HANA'
BEGIN
   UF(MyCode-HanaVersion)  // Run SQL Report with HANA-specific syntax
END
ELSE
BEGIN
   UF(MyCode-SQLVersion)  // Run SQL Report with SQL-specific syntax
END

Comments

6 comments

  • Comment author
    SSP Automation
    Thank you for your request. It has been scheduled for review by the development team that will get back to you should there be questions.
    (Please note that as we are user-driven we can't guarantee that your request will be met unless it gets many votes and/or fit the product vision)
    Read more about the Feature Request process here
    [Internal Id: 54665]
    0
  • Comment author
    Rasmus Jensen

    Possible with .NET Code Snippet

    For Copy/Paste:

    if(SBO.AddonLogic.Addon.IsHanaConnection) { return "HANA"; } else { return "MSSQL"; }

     

    0
  • Comment author
    Rasmus Jensen

    As for version, it is easy to get from the database - Example:

    MessageBox(SQL:SELECT "Version" FROM "CINF")

    0
  • Comment author
    Bernhard Schmieder

    the dynamic code for getting the DB-Type is a good idea; has anyone got it to run?

    I get the error:

    0
  • Comment author
    Rasmus Jensen

    Just tested on latest B1UP version... It still seems to work as expected:

    0
  • Comment author
    Bernhard Schmieder

    Thank you Rasmus,

    now I got it!!
    I tried it with a separate UF with type "Dynamic Code (.NET SDK) instead of using the right-click menu ".NET Code".
    Best regards

    0

Please sign in to leave a comment.