none
The database is not accessible. (ObjectExplorer)

    Question

  • Hey guys,

    After setting up a database as a datasource in Visual C# I now cannot access my database in SqlServer 2008. I receive the following error message. I restarted my computer and still cannot access the database.

    Does anyone know how I gain access back in SqlServer 2008

    ===================================

    The database SampleDatabase is not accessible. (ObjectExplorer)

    ------------------------------
    Program Location:

       at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.DatabaseNavigableItem.get_CanGetChildren()
       at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItem.GetChildren(IGetChildrenRequest request)
       at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ExplorerHierarchyNode.BuildChildren(WaitHandle quitEvent)

    Cheers,

    Andrew.

    Sunday, September 04, 2011 1:06 AM

Answers

  • After setting up a database as a datasource in Visual C# did you test th connection?

    I am not clear with what exactly you are trying to do? If you are failing during settng up the dataset that means the connection string has not been set properly. Also ensure that SQL server is running fine and the database that you are trying to access is in "online" state.

     

    -Please mark it as answer if you are satisfied with the resolution.


    Thanks, Deepesh
    • Marked as answer by KJian_ Friday, September 09, 2011 3:12 AM
    Sunday, September 04, 2011 1:48 PM

All replies

  • After setting up a database as a datasource in Visual C# did you test th connection?

    I am not clear with what exactly you are trying to do? If you are failing during settng up the dataset that means the connection string has not been set properly. Also ensure that SQL server is running fine and the database that you are trying to access is in "online" state.

     

    -Please mark it as answer if you are satisfied with the resolution.


    Thanks, Deepesh
    • Marked as answer by KJian_ Friday, September 09, 2011 3:12 AM
    Sunday, September 04, 2011 1:48 PM
  • Hello,

    Please, could you tell us how you have created your database ( with SSMS or with your Visual Studio ) ?

    Also, could you provide the edition for your SQL Server 2008 (Express,Web,Workgroup,Standard,Developer,Entreprise,...) , the version ( 2008,2010) and the edition (Express,Pro,...) of your Visual C# ?

    If Express for both , i am fearing a problem of user instance.

    Have a nice day


    Mark Post as helpful if it provides any help.Otherwise,leave it as it is.
    Sunday, September 04, 2011 2:17 PM
    Moderator