[WD9] Exists something like DB_EXIST

Startbeitrag von Louis Verbraak am 15.07.2009 13:12

Hello to you all,

I copied my code for describing a HFCS-connection from WD12 to WD9. Unfortunately the parameter "DB_EXIST" doesn't seem to work in WD9. Is there another way in WD9 to prevent the server to create a database when it doesn't exist. In WD12 the HOpenConnection returns False if the database doesn't exist.

Here is the code I use:
lbConnection=HDescribeConnection(gpsConnection,lsUser,lsPassword,lsDatasource,lsDatabase,hAccessHFClientServer,hOReadWrite,"DB_EXIST")

Thanks in advance.

Antworten:

Re: [WD9] Exists something like DB EXIST

Hi, You just need to use the HListDatabase(connection) commmand to list all the available databases on the HF CS server. The command will return a string with all the available databases, separating each database by a TAB character.
Just remember to use the "Database" parameter as empty when using the HDescribeConnection command, previous to use the HOpenConnection and HListDatabase commands.


Message forwarded from pcsoft.us.windev

von Eduardo Esteban.pcs.crosspost - am 15.07.2009 15:31

Re: Re: [WD9] Exists something like DB EXIST

Hello Eduardo,

Thanks for your answer. That's indeed another way to find out if the database exists. Because in WD12 there is the "DB_EXIST"-parameter, I hoped there was one for WD9 as well.

von Louis Verbraak - am 15.07.2009 16:01
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.