hmy is the tables primary key and so there's only one row per hmy.SO with this being the case, my update should work, or at least i'd think.. – granada Coder Apr 24 '13 at | Did you find this question interesting? Please click the link in the confirmation email to activate your subscription.When I populated unit_rent table, I grabbed all the rows from my unittype table. The unittype table contained multiple units associated with particular unit types, so whenever I'd update one row with my stored procedure, all the other units associated with that unit type would become ! So I re-populated my unit_rent table with only distinct unit types and my problem was solved. | this answer answered Apr 30 '13 at reuben Canowski 152 2 17 Recommend：SQL Server Stored Procedure to Select/Update/Returnpdates a column in that row, and then returns this row with the changes.Pretty silly mistake, but I'd prefer not to leave it unanswered on the off chance it may help someone else. For example: row = SELECT TOP 1 FROM Requests UPDATE Requests SET row. try writing the update statement in the code first and then use SP. Is there possibly some incompatability problem using web developer express addition with SQL server 2000? Seems there was a problem with the connection string. However, When I run it again, it still will not work.Additionally, we are not actually updating the Database Snapshot, the changes are still made directly to the main database.
Running the code in listing 2, you should have a result set as shown below: In conclusion, the error message that informs us the database is read-only, while identical to the message returned when writing to a Read-Only database, is only partially accurate in the context of a Database Snapshot.Additionally, the logic could reside in the same SP as the query, allowing for conditional logic.up vote 1 down vote favorite 1 I've got a SQL Server stored procedure that references a table in my database where users can manually update values for a rent field ('Rent1').Questions that come to mind are: Let me know if you think it’s a bug.From my perspective, this makes sense as the database snapshot is actually a read/write database, persisting older values as records change.