Welcome! Log In Create A New Profile

Advanced

[WD9] Exists something like DB_EXIST

Posted by Louis Verbraak 
Louis Verbraak
[WD9] Exists something like DB_EXIST
July 15, 2009 03:12PM
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.
Eduardo Esteban.pcs.crosspost
Re: [WD9] Exists something like DB EXIST
July 15, 2009 05:31PM
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
Louis Verbraak
Re: Re: [WD9] Exists something like DB EXIST
July 15, 2009 06:01PM
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.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: