Re: How to retrieve a list of databases
Posted in 1997
If you have version 7.2x ESQL/C, you will find the sqgetdbs() function documented, which is what I've always used -- it has worked in all versions except the 4.1x versions of ESQL/C (and if you found the right missing functions, even that worked!). There is sample code in the IIUG archive (http://www.iiug.org) which shows how it is used, independently of whether you have the 7.2x ESQL/C manual or not. I believe the code there includes the missing functions for 4.1x if you need them. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> }From: Denham.M@amstr.com }Date: Tuesday, 10 June 1997 4:31pm MT }X-Informix-List-Id: <list.14911> } }If you have V7 (possibly in later V5 versions too 5.06+), you can open the sysmaster }database on the server and read the names of the databases from sysdatabases. } }You will of course then need to connect to each of these databases silently to determine }if the user has permission to access the db before presenting the user with a list.... }if you want to avoid the user seeing the names of databases that they do not have perms to }access. } }>From: pyurga@lucent.com (Paul Yurga) }>Date: 10 Jun 1997 20:54:02 GMT }>X-Informix-List-Id: <news.39013> }> }>How can I get a list of the available databases so that I can prompt a user for }>the database with which to connect? I am writing a PowerBuilder app for this }>purpose so if there is a PB specific way I'll take that as well.