There should be no actual issues with conflict on an ADD operation through
an ADO recordset (although that's a technique I used only when I first
started working with SQL Server and ADO at all, coming from a Btrieve
background). In several years of running the code (it worked) there were no
conflict or concurrency issues related to adding records through the
recordset objects.
==+==+==+==+==+==+==+==+==+==+==+==+
Brendt W. Hess
Database Administrator, Motosport, Inc.
brendt.[Email address protected]
==+==+==+==+==+==+==+==+==+==+==+==+
-----Original Message-----
From: John A DAVIS
[mailto:mssqldba-ezmlmshield-x33872712.[Email address protected]
Sent: Wednesday, January 31, 2007 9:22 AM
To: LazyDBA Discussion
Subject: seeking advice on potential concurreny issue
I have inherited some code from a wantobe developer (only thing worse
than a developer). Essentially, it opens a recordset to a table and adds
a record. It does this for 3 tables inside a connection transaction.
What I am wondering is what happens when 2 users are trying to add a
record? What happens? I am familiar with many ways of using ADO to add
records (including this one), but I thought I would get some input
before throwing the baby out with the bath water and rewriting the
code.
Set rs = New ADODB.recordset
rs.Open "TENASACT", conn, adOpenDynamic, adLockOptimistic, adCmdTable
It's the lock type that has be wondering what the consequences are of 2
"adds" bumping heads.
Database is MS SQL Server 2000.
TIA
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
MS Sql Server LazyDBA home page