SQL Server 2005 ? Can Insert records but cannot Edit or Delete records

Discussion in 'Databases' started by Chicago_Lar, May 15, 2007.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I just wanted to share an oddity I ran into, in the event that one of you encounter the same thing.
    </o:p>
    First, the environment: I?m developing my ASP.Net site using Visual Web Developer Express and SQL Server Express. I have a DASP MS SQL Server 2005 database online. I upload the SQL Express .mdf file and attach it using the DASP tool.
    </o:p>
    I was making a ton of changes, both to the database (.mdf) and to my web forms (which are using the .Net data controls).
    </o:p>
    Somewhere along the way, I discovered I could add a new record at DASP, but I could not edit or delete any of them. I checked a couple hundred posts in this forum, and Google?d the problem in several different ways, all to no avail.
    </o:p>
    Then I noticed I had the same problem with SQL Express. I tried a dozen remedies, again to no effect. Being from the old school, I decided I?d take the slash and burn approach and see if that made a difference.
    </o:p>
    So I went to the form, deleted the SQLDataSource and deleted the DetailsView control. Then I re-added the latter and recreated the former.
    </o:p>
    Viola! Things worked once more, both in SQL Express and DASP MS SQL Server 2005 (assuming I change the connection strings in web.config appropriately).
    </o:p>
    Don?t have the foggiest what was happening behind the scenes, but all?s well that ends well.

    Lar
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    Jes.. That's strange!


    Just curious, what error were you getting?


    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. I wasn't getting an error message at all. I'd click on "Edit", make my changes, click on "Update", then it would return me to display mode as normal, but none of the editshad taken. Same thing with a Delete. Acted like it was working normally, but it didn't delete the record.


    Lar
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page