Results 1 to 3 of 3

Thread: [RESOLVED] Getting Database names

Threaded View

  1. #2
    New Member
    Join Date
    Sep 2007
    Posts
    4

    Re: Getting Database names

    using SQLDMO; (By adding reference to SQLDMO.dll)

    SQLDMO.SQLServerClass objSQLServer = new SQLDMO.SQLServerClass();
    objSQLServer.Connect("server", "username", "password");
    foreach ( SQLDMO.Database db in objSQLServer.Databases)
    {
    ListBox2.Items.Add(db.Name);
    }
    Last edited by ksureshreddy27; Sep 27th, 2007 at 06:32 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width