Re: Locks and ADO



Christian Schaeffler wrote:
Hello newsgroup!

Please let me quote a post I made to the SQL Server newsgroup. In
fact the ADO question fits better in here I think.

[quote]
We are using SQL Server as database for an application. Recently we
faced some deadlock errors and now I'm trying to understand what
happens... I already did the basic tracing with SQL Profiler and the DBCC
TRACEON
(3605,1205,-1) parameters and isolated some deadlocks with this
method. So my questions are more to the basics to learn how avoid
those problems. [...]
3. Since most of the queries we use are launched out of the source
code of our application, what would be the better (= safer) method?
Using the ADODB.Connection.Execute statement or openening a ADO
recordset and using ADO's integrated methods?
[/quote]

Any hints are welcome.

My preference is to use stored procedures. This is not a universal
preference by any means.

A lot of it depends on the type of application. I'm heavily in the ASP
world, so my goal is to get my database work done as quickly as possible:
get in, accomplish the task and get out. This means avoiding cursors,
especially for data maintenance. Since my intent is to minimize my
connection time, concurrency issues are minimized: yes they still exist, and
in some cases I need to write my stored procedures with concurrency issues
in mind (has te data changed since the it was retrieved by the current user,
etc.). But for the most part, I'm writing from the standpoint of "the last
editor wins".

OTOH, with a desktop application, where a user will typically stay connected
to the db for some period of time, perhaps retrieving a recordset and
working with it, it actually makes more sense to utilize the functionality
offered by the ADO cursor library to handle concurrency issues.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


.



Relevant Pages

  • Re: Locks and ADO
    ... Please let me quote a post I made to the SQL Server newsgroup. ... fact the ADO question fits better in here I think. ...
    (microsoft.public.data.ado)
  • Re: How to Mimic Access Externally Linked Tables using ADO?
    ... > using SQL Server for efficiency reasons. ... > connection up programmatically using ADO or ADOX or some SQL Server API? ... >> newsgroup, but if you have a good reason to send me e-mail, you'll find ... ADO does not have a query engine. ...
    (microsoft.public.data.ado)
  • Re: How to access the SQL server express from mfc application?
    ... There are different ways to do this via MFC. ... You could certainly try ADO, ... the entire contents of the database to a SQL Server Standard Server. ...
    (microsoft.public.vc.mfc)
  • Re: DAO vs ADO
    ... and ADO when working with SQL Server data. ... which makes DAO a good choice. ... > add additional overhead by loading Jet, ...
    (microsoft.public.access.conversion)
  • Re: DAO vs ADO
    ... and ADO when working with SQL Server data. ... which makes DAO a good choice. ... > add additional overhead by loading Jet, ...
    (microsoft.public.access.adp.sqlserver)