I have a query I am creating a Window App in vb.net (4.0) in which I have to use multiple databases although all databases are same with same db structure & stored procedures,just names are different. In the very starting of application, I need to give a option to the user that these are available db & user will select which one to connect & use.
So is it possible to detect how many db are available in the SQL Server through vb.net & how can achieve this (to provide options to the user) ?
What would be the best approach?
Thanks
It dependso n permissions.
Basically you can always conect to the server and ask the server. All metadaa is available in the system management database and you can submit sql there to ask for waht databases exist.
Get list of databases from SQL Server