New Keywords for Database Type and Database Version Answered
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
(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]
Possible with .NET Code Snippet
For Copy/Paste:
if(SBO.AddonLogic.Addon.IsHanaConnection) { return "HANA"; } else { return "MSSQL"; }
As for version, it is easy to get from the database - Example:
MessageBox(SQL:SELECT "Version" FROM "CINF")
the dynamic code for getting the DB-Type is a good idea; has anyone got it to run?
I get the error:
Just tested on latest B1UP version... It still seems to work as expected:
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
Please sign in to leave a comment.