Questions tagged [rowversion]
91 questions
0
votes
2 answers
Exception when updating row with rowversion?
I have a table that looks like this :
CREATE TABLE [dbo].[akut_prioritering]
(
[behandling_id] [int] NOT NULL,
[akutstatus] [int] NOT NULL,
[nasta_dag] [bit] NOT NULL,
[sort_order] [bigint] NOT NULL,
[rowversion] [timestamp] NOT…

Banshee
- 15,376
- 38
- 128
- 219
0
votes
1 answer
LIKE operator on timestamp column, SQL Server
How can I use LIKE operator on a column having timestamp (rowversion) data type ?
Below are the queries I tried but no luck.
-- no data is fetched using this SQL
SELECT * FROM TAB
WHERE tRowVersion LIKE '0x000000000000E05%'
-- incorrect syntax near…

Aditya
- 2,299
- 5
- 32
- 54
0
votes
0 answers
How to replicate SQL Server rowversion behaviour for some fields only
SQL Server version 10.50.4000.
I have a table:
create table people
(
national_id char(16),
full_name char(255),
last_visited datetime
)
I want to add a field that will work exactly like a rowversion field, except:
It must update only…

cja
- 9,512
- 21
- 75
- 129
0
votes
1 answer
EF 4.1.3 Implenting Rowversion for Concurrency is not working
I have got a BaseEntity class which contains a, byte array called stamp, id and state, which every Entity inherits from I am mapping the stamp to
Property(t => t.Stamp).IsRequired().IsRowVersion();
this is set in BaseEntityConfiguration
which…

user551445
- 25
- 6
0
votes
0 answers
row version don't match after deleting and reinsert
I have a table with rowversion column .
I am getting the data with below query
BEGIN TRANSACTION EVENTS
Declare @eventId int
Create table #tempEvents
(
[EventID] [int] NOT NULL,
)
Insert into #tempEvents
(
[EventID]
)
(Select top(@TopN)…

Chandra Mohan
- 729
- 2
- 10
- 29
0
votes
0 answers
How to disable rowversion checking in MS-SQL
I'm using Entity Framework on MS-SQL database. I'm implementing a PUT web endpoint to update a "response set".
If the caller indicates forceSave = true, I want to clobber the record even though the RowVersion does not match.
This is my code, but it…

John Henckel
- 10,274
- 3
- 79
- 79
0
votes
0 answers
Why does a null rowversion member break DataContext.Attach()?
Note on this question being marked as "duplicate": Unlike the question in Linq row not found or changed my question is about a specific scenario that triggers the "Row not found or changed" message and is seeking a resolution for…

urig
- 16,016
- 26
- 115
- 184
0
votes
2 answers
Need help understand this example about SQL Server rowversion?
Before reading this example, I can understand rowversion myself that it reflects the last updated timestamp on a record. I think about its usage like this: First after reading a record, the rowversion column value should be achieved. Then before…

Hopeless
- 4,397
- 5
- 37
- 64
0
votes
1 answer
Retrieving new rowversion after INSERT using @@DBTS - is it safe?
It is common practice to pick up the newly created IDENTITY of a table using the @@IDENTITY variable after an INSERT.
Is it just equality correct to retrieve the last rowversion value following an UPDATE in a similar manner using the @@DBTS…

Chris Walsh
- 3,423
- 2
- 42
- 62
0
votes
1 answer
How to create rowversion field with using frame work migrations
How would I generate a rowversion field using entity framework migrations?
Here is a sample of what I am trying to achieve.
CreateTable(
companiesTable,
companies => new
{
Id =…

Cogslave
- 2,513
- 3
- 25
- 35
0
votes
1 answer
timestamp, rowversion and datetime - I need a mark when a row is inserted or updated
I have the following requirement:
I have a table with 1 unique auto-incremental Int ID and data columns.
I need the following:
Every time a row is inserted into that table, a column at the right end of the table must hold the full datetime of that…

scorpiophd
- 105
- 1
- 6
0
votes
1 answer
Row versioning in NHibernate
I'm developing a social app, which will provide users to create walls for messages (like on FB) and invite their friends. I have a table in my DB that contains the walls and their version (in TimeStamp), meaning - their last update time.
When…

Lidor
- 157
- 1
- 8
0
votes
1 answer
Clean Domain Model With Entity Framework Concurrency Why Am I Forced To Use RowVersion?
Hi have a domain model which is nice and clean. Such as:
public class Blog
{
public int Id {get;set;}
public string Title {get;set;}
public string Body {gets;set;}
}
Why does Entity Framework force me to pollute the domain model with…

big_tommy_7bb
- 1,257
- 2
- 21
- 37
-1
votes
1 answer
Adding a rowversion column to a table and ordering existing data
I want to add a rowversion column to an existing table in my database so I can essentially order by the last time each record was modified successfully. My question is, how will adding the rowversion affect my existing data? Will the rowversion…

user1501171
- 210
- 1
- 3
- 17