Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
3
Erster Beitrag:
vor 2 Jahren, 9 Monaten
Letzter Beitrag:
vor 2 Jahren, 9 Monaten
Beteiligte Autoren:
Arie, KenKnight

SYS.Databases equivalent in Hyperfile

Startbeitrag von Arie am 18.05.2015 12:29

Hi,
using sql-server I can query SYS.Databases to get a list of all databases.
Is there an equivalent in HFSQL, using a SELECT statement?
I need this in an external BI reporting tool.

Antworten:

Hi Arie,

I'm not aware of any commands to do it natively, however, a work around is to write a small executable that runs on the HFSQL server and it will use hListDatabase and other needed commands to build a table in a database on the server. This could fire every few minutes. From there you could use a standard sql select function.

There are limited WL.functions that can be called directly in SQL and most relate to string / date manipulation. A side note is that HFSQL does support the "dual" table concept to some degree.

So

SELECT SYSDATE FROM DUAL

will return a valid date time stamp from the server.

And this

SELECT UUID() FROM DUAL

will return a UUID string


Cheers!
ken

von KenKnight - am 19.05.2015 18:05
Thanks Ken,

I had the same idea, fill one or more tables with this kind of info.
Uunfortunately hlistdatabase() is not supported in a stored procedure, so indeed we need a piece of client code. Somewhere....

I already have an update mechanism in my software, which fires every time a new version is used for the first time. I will add this code here and that will do for the moment.

von Arie - am 19.05.2015 19:34
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.