PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → SYS.Databases equivalent in Hyperfile
SYS.Databases equivalent in Hyperfile
Iniciado por guest, 18,may. 2015 14:29 - 2 respuestas
Publicado el 18,mayo 2015 - 14: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.
Publicado el 19,mayo 2015 - 20:05
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
Publicado el 19,mayo 2015 - 21:34
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.