Everytime i restart my VS2005 my database isn´t connected

Last post 07-17-2008 6:30 AM by FabM. 8 replies.

Sort Posts:

  • Everytime i restart my VS2005 my database isn´t connected

    07-13-2008, 5:57 AM
    • Loading...
    • FabM
    • Joined on 05-30-2008, 5:33 PM
    • Posts 35

    I´ve made a backoffice page connected to a table in the database but every damm day i start my project again the connection isn´t there and then i have to configure all again from the start including the InsertQuery parameters in the sqldataSource properties.

    Is my DataBase getting disconnected when i close VS? Is that possible? What can i change? 

  • Re: Everytime i restart my VS2005 my database isn´t connected

    07-13-2008, 11:48 AM
    • Loading...
    • bolfak
    • Joined on 06-20-2008, 12:00 PM
    • Lagos, Nigeria
    • Posts 32

    I see no reason why this should be the case if you properly saved ur project. make sure the project folder is not read-only and try saving before exiting the IDE. Hope this solves ur probs.

    Worry never robs tommorrow of its sorry but only saps today of its strength.
    http://www.programmaticallyspeakingdotnet.blogspot.com
  • Re: Everytime i restart my VS2005 my database isn´t connected

    07-13-2008, 7:11 PM
    • Loading...
    • FabM
    • Joined on 05-30-2008, 5:33 PM
    • Posts 35

    I always save the items before i leave the IDE but the problem persists. This is a very strange thing happening...

  • Re: Everytime i restart my VS2005 my database isn´t connected

    07-14-2008, 6:15 AM
    • Loading...
    • FabM
    • Joined on 05-30-2008, 5:33 PM
    • Posts 35

     Well i was told to check if the Sql Server Express is active in the control panel but where do i find it?

  • Re: Everytime i restart my VS2005 my database isn´t connected

    07-14-2008, 6:57 AM
    • Loading...
    • belvin
    • Joined on 05-17-2008, 2:39 PM
    • Posts 87

    hi,

    contact your DBA. ask him if the IIS metabase rights are set properly. check your db rights with DBA. check the DB server too.

    Thanks,
    Bel..
  • Re: Everytime i restart my VS2005 my database isn´t connected

    07-14-2008, 7:09 AM
    • Loading...
    • TATWORTH
    • Joined on 02-04-2003, 8:34 AM
    • England
    • Posts 7,117

     >every *****day i start my project again the connection isn´t there and then i have to configure all again from the start including the InsertQuery parameters in the sqldataSource properties.

    Which version of SQL Server are you using? With SQL 2005, I would expect that database would not be open by default. It should however retain the connection settings.

    Have you checked the event logs for releant messages?

    Don't forget to click "Mark as Answer" on the post that helped you.
    This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
  • Re: Everytime i restart my VS2005 my database isn´t connected

    07-14-2008, 7:28 AM
    • Loading...
    • FabM
    • Joined on 05-30-2008, 5:33 PM
    • Posts 35

     I´m using 2005.

     The strangest thing is that i also have connections to the database in other pages of the website and they are fine. It´s just this one that i always have to restart my database...i even deleted the DataSource and made a new one but i still have the same problem.
     

  • Re: Everytime i restart my VS2005 my database isn´t connected

    07-17-2008, 5:31 AM

    Hi,

    Based on my understanding, you configure the SqlDataSource control to connect Database. But the connection is lost when you reopen this project in Visual Studio, right?

    Where do you save the connection string, inside of DataSource control or web.config file? You can try to save connection string to web.config file by selecting "Yes, save this connection as: " option while configuring it.

    Do you do some special work on that page or could you please post a simple test code that be used to repro the issue? It will help us move more quickly toward a solution.

     

    I look forward to receiving your test results.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
  • Re: Everytime i restart my VS2005 my database isn´t connected

    07-17-2008, 6:30 AM
    Answer
    • Loading...
    • FabM
    • Joined on 05-30-2008, 5:33 PM
    • Posts 35

     Thomas Sun that´s right, i save the connectionString inside the DataSource control.

    I did this with all the other tables of my page but this one has problems. The only difference is that this DataSource has the option to Generate Insert and Delete  but...

     Well i just opened VS and the DataSource connection is there. It´s strange that it now works and i didn´t change anything.

    What i did a few days ago was to delete another DataBase that i had in my project which perhaps was creating a few conflits.
     

Page 1 of 1 (9 items)
Microsoft Communities
Page view counter