database exist or not

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bharathi228
    New Member
    • Jul 2008
    • 28

    database exist or not

    how to check if database exist or not in sqlserver through asp.net code.
    if not exists i will give msgbox to user
    otherwise i will allow the user to create reports

    pls any one give me solution.its urgent
  • amitpatel66
    Recognized Expert Top Contributor
    • Mar 2007
    • 2358

    #2
    Do you need to check if the database exist or not
    OR
    Do you want to check if the database is UP and RUNNING or SHUT DOWN?

    Comment

    • bharathi228
      New Member
      • Jul 2008
      • 28

      #3
      no.only i want to check database exists or not through asp.net code

      so i need a query for this

      Comment

      • ck9663
        Recognized Expert Specialist
        • Jun 2007
        • 2878

        #4
        Try using this function.


        -- CK

        Comment

        Working...