List Available Databases in VB6

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Deon Smit
    New Member
    • Aug 2007
    • 2

    List Available Databases in VB6

    Hi all.

    Can someone give me code to List available Databases in a Combobox?
    ComboBox is Called, cboDSNList

    Please Help

    Thanks.
  • SanjuMtr
    New Member
    • Mar 2007
    • 47

    #2
    Originally posted by Deon Smit
    Hi all.

    Can someone give me code to List available Databases in a Combobox?
    ComboBox is Called, cboDSNList

    Please Help

    Thanks.
    Hi,
    your question is not clear to me.Kindly explain in details.
    what do u mean by available data base?

    Comment

    • Deon Smit
      New Member
      • Aug 2007
      • 2

      #3
      Originally posted by SanjuMtr
      Hi,
      your question is not clear to me.Kindly explain in details.
      what do u mean by available data base?


      Lets say my SQL Server has the Following Databases. A,B,C,D
      So I want to be able to choose the database I want to Use in a combobox to enable the login. I have created the Login but can't seem to get the Combobox to Show Available SQL databases.

      Thanks

      Comment

      • pureenhanoi
        New Member
        • Mar 2007
        • 175

        #4
        Originally posted by Deon Smit
        Lets say my SQL Server has the Following Databases. A,B,C,D
        So I want to be able to choose the database I want to Use in a combobox to enable the login. I have created the Login but can't seem to get the Combobox to Show Available SQL databases.

        Thanks
        When you create a new table from SQL server, the sever will insert the database name into table 'sysdatabase' in 'Master' database.
        All that you need is create one connection to Master database (exist in all SQL-Server) first. And then, select * FROM 'sysdatabase' Table.
        You can open the Master database, see the structure of 'sysdatabase'. This can help you selecting correct fields that need for your application.

        Comment

        Working...