on 12-17-2015 9:23 AM
Hi all,
Using SQL Anywhere 11.0.1.2713
Powerbuilder 11.5.1. build 5097
In ISQL Anywhere we can do the following select property('licensecount') from dummy; (which gives us the number of sql licenses)
How do we get the result of this in PB so that we can show the number of licenses in our HELP / ABOUT window ?
TIA
John
Hi John;
The easy way is to use a DataWindow!
1) Create a new DW object.
2) Choose SQL Select as the Data Source.
3) In the SQL Painter from the DW Wizard, select CANCEL from the Select Tables dialogue.
4) From the SQL Painter's menu, select Design => Convert to Syntax
5) Paste your "select property('licensecount') from dummy; " statement into the pane "as is".
6) Exit the SQL Pane back to the DW Painter.
7) Now select Retrieve in the Preview Pane.
😎 Change the default column name from Compute_0001 to something more humane (ie: cc_license_count).
9) Save the new DWO
10) At run time, use the Retrieve ( ) + GetItemString ( ) methods to get the data value and convert (cast) this to whatever data type you need from there.
HTH
Regards ... Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Been a while since I did iSQL, but try: SELECT DB_Property('ConnCount', DB_ID(DB_Name())) FROM dummy; If I remember dummy is the system table that when joined to returns 1 row, correct? Like Dual in Oracle. Like I said, been a while.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.