Questions

How to select database from a particuler server (mssql server 2005)

+
0 Votes
Locked

How to select database from a particuler server (mssql server 2005)

hdeepak
Hi,

I want to make a button which browse the all database in a particuler server. How can I do this.
  • +
    0 Votes
    Tony Hopkinson

    MS SQL they are in the system table sysdatabases, there will be an sp_help... as well.
    MySQL it's show databases

    Once you've got the drop them in a list or combo box. Presumably the user doing the showing has the relevant permissions.

    +
    0 Votes
    p.j.hutchison

    To get a list of databases use:

    use master
    select name from sysdatabases;

    Then your web page can use the information to populate a drop down list populated by the database names using ASP, PHP or Perl to create the web page.

  • +
    0 Votes
    Tony Hopkinson

    MS SQL they are in the system table sysdatabases, there will be an sp_help... as well.
    MySQL it's show databases

    Once you've got the drop them in a list or combo box. Presumably the user doing the showing has the relevant permissions.

    +
    0 Votes
    p.j.hutchison

    To get a list of databases use:

    use master
    select name from sysdatabases;

    Then your web page can use the information to populate a drop down list populated by the database names using ASP, PHP or Perl to create the web page.