[Gambas-user] little disapointment with DB

Benoit Minisini gambas at ...1...
Tue Nov 18 17:37:51 CET 2003


Le Lundi 17 Novembre 2003 18:53, Olivier Coquet a écrit :
> how can i know if a database exist or not???
>
> To know if connection between my progy and mysql, i can catch an error but
> if my connexion is ok i can't know if a specific database exist or not
>
> i've seen a .ConnectionDatabase.Exist but i d'ont understand how i can use
> it......
>
>
> Regards
> olivier
>
>

You must connect to the database, with a null database name, and then use
MyConnection.Database.Exist(DatabaseName) to know if a database exist in the 
server. 

Look in the code of the gambas database manager ! :-)
I help you: take the function CServer.RefreshDatabase.

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...





More information about the User mailing list