Questions tagged [rowversion]

86 questions
1
vote
1 answer

Upsert options: rowversion vs datetime

Many times I need to move the data of a large table (let's call it source) to a clone of it (let's call it target). Due to the large size, instead of just deleting/inserting all, I prefer to upsert. For easiness, let's assume an int PK col named…
George Menoutis
  • 4,652
  • 12
  • 30
1
vote
1 answer

Can't get Dapper to handle SQL RowVersion properly

I've got a rowversion column added to my database and I'm trying to get Dapper mapping to populate it properly on my object. My object has... public byte[] RowVersion { get; set; } And I have included the RowVersion column in my query but when I do…
Shane Courtrille
  • 13,432
  • 19
  • 69
  • 110
1
vote
3 answers

How to find the maximum in array of binary(8) using powershell?

I'm trying to find the max by using function ExecuteSqlQuery ($SQLQuery) { try { $Datatable = New-Object System.Data.DataTable $Connection = New-Object System.Data.SQLClient.SQLConnection $Connection.ConnectionString =…
1
vote
0 answers

WVersionManager cannot be applied to anonymous .android.view.View.OnClickListener

I'm trying to add an Update functionality with Button inside the app from android project. Below is the code I'm using , But I'm constantly getting error of WmversionManager (android.app.activity) WVersionManager cannot be applied to anonymous…
1
vote
0 answers

How can I use a SQL Server column of type rowversion?

With Visual Basic in Visual Studio I am trying to select a row of type rowversion from a SQL Server database. 'version' is a column of type rowversion SELECT [Version] FROM Employees WHERE Employee_id = 1 Then in VB - To get value from version…
Carl
  • 11
  • 1
1
vote
0 answers

Get RowVersion after update

I use Entity Framework 4 with row version. I want to update a row and then receive the new row version. Can I do it without re-access the row in the DB?
TamarG
  • 3,150
  • 10
  • 41
  • 70
1
vote
1 answer

Using "rowversion" as primary key column

I am using SQL Server 2012 and I want to create a "changes" table - it will be populated with data from other table when the second table columns values are changed. I am adding to the "changes" table "datatime2", and "rowversion" columns in order…
gotqn
  • 36,464
  • 39
  • 145
  • 218
0
votes
1 answer

ASP.NET OLTP App - creating new version of records

My question is same as this question - but a little to add on to it. My problem is that the users of my web app are allowed to create new versions of a record. Every new version of a record results in creating corresponding "new versions" in 50…
Lalman
  • 886
  • 2
  • 9
  • 25
0
votes
1 answer

how to convert ulong to rowversion

reference to converting sql server rowversion to long or ulong? i can convert SQL RowVersion to ulong by code: static ulong BigEndianToUInt64(byte[] bigEndianBinary) { return ((ulong)bigEndianBinary[0] << 56) | …
Goldli Zh
  • 153
  • 1
  • 12
0
votes
0 answers

Update a database record rowversion by not touching the record with SQL UPDATE?

I have two tables TableA and TabelB in SQL Server, there is a foreign key relationship between them, and TableA defined a rowversion column to synchronize things. It's required to update the rowversion of TableA if the corresponding record in TableB…
0
votes
1 answer

Rowversion field causes BULK INSERT to only import every other row

When I perform a BULK INSERT into a table with a rowversion field, only every other row gets imported. Here's my source text file: If I perform a BULK INSERT into a table with a rowversion field, only two rows are imported: However, if I do the…
mwolfe02
  • 22,236
  • 8
  • 78
  • 132
0
votes
0 answers

Distributed rowverison synchronization following a restore of the source database

I am using SqlServer RowVersion/TimeStamp to update a distributed set of time clocks with a current list of employees. This is using a scheme similar to https://www.mssqltips.com/sqlservertip/4545/synchronizing-sql-server-data-using-rowversion/ I…
0
votes
0 answers

Get actual time when the record appeared in the tempoal table or transaction duration

Period start timestamp is actually showing the time when the transaction started. For long running transactions the time when the record will actually appear in the system and the period start timestamp can differ just a lot. This behavior is…
0
votes
2 answers

is rowversion a transactionally-consistent value to capture table data changes

If an ETL process attempts to detect data changes on system-versioned tables in SQL Server by including rows as defined by a rowversion column to be within a rowversion "delta window", e.g.: where row_version >= @previous_etl_cycle_rowversion and…
jjt
  • 115
  • 1
  • 10
0
votes
1 answer

SQLite logical clock for row data like rowversion in SQL Server

Does SQLite have anything like SQL Server's rowversion column that will increment every time a row changes? Essentially, I want to have a logical clock for each of my tables that updates whenever a table updates. With this logical clock, my…
Heath Borders
  • 27,732
  • 16
  • 126
  • 230