Page 1 of 1

SQL Server and concurrent select/update

Posted: Wed 07 May 2014 05:28
by chkaufmann
Hi,

I use SQL Server 12, native client and MARS activated. First I run a select with a join on two table to do some validation. During iterating over all rows, I do updates on selected records.

Everything worked fine for over a year now, but it seems since the update to UniDAC 5.2, this doesn't work anymore, if I want to set a "Date" field to something else than "null" in my update statement. I always get an error like "Lock request time out period exceeded."

My select statement is

Code: Select all

select 
  A.ALLNAMES, A.ATHLETEID, A.CLUBID, A.CLUBID_ALT, A.FIRSTNAME, A.GENDER, 
  A.LASTNAME, A.LASTNAME_UPPER, A.NAMEPREFIX,
  AD.LICENSE, AD.LICENSE_ALT, AD.LICVALID_FROM, AD.LICVALID_UNTIL, 
  AD.LICVALID_FROM_ALT, AD.LICVALID_UNTIL_ALT 
from ATHLETE A left join ATHLETEDETAIL AD on A.ATHLETEID = AD.ATHLETEDETAILID
my first update statement is (this works):

Code: Select all

update ATHLETE set LASTNAME_UPPER = :PLASTNAME_UPPER where ATHLETEID = :PATHLETEID

my second update statement is (this doesn't work):

Code: Select all

update ATHLETEDETAIL 
set LICVALID_FROM = :PLICVALID_FROM, LICVALID_UNTIL = :PLICVALID_UNTIL
where ATHLETEDETAILID  = :PATHLETEDETAILID
Were there any changes between UniDac 4.x to 5.x that could cause these problems?

cu Christian

Re: SQL Server and concurrent select/update

Posted: Wed 07 May 2014 10:49
by azyk
Hi,

We couldn't reproduce the problem.
To solve the problem, try setting the TUniQuery.SpecificOptions.Values['UniqueRecords'] option to False. If it doesn't help, then please send us a complete small test project to reproduce the problem.