Ado and lock timeout error: is it a bug or it's my fault?
- From: rocco <roccobarbaresco@xxxxxxxxx>
- Date: Mon, 21 Jan 2008 00:34:07 -0800 (PST)
Hi all
I'm experiencing a strange problem in Delphi 7 connecting to SqlServer
(and MSDE) using Ado components:
if I have a table locked and try to insert a record from my program (I
use a TAdoQuery) the query runs as if there were no errors but
obviously the new record was not inserted (in fact sqlserver raises an
error 1222 which means lock timeout but ADO does not trigger it!!).
It's quite easy to replicate this issue: open query analyzer and do
the following to statements to lock a table:
begin transaction
insert into table TEST (field1, field2) values ('test','one')
At that point execute your program and, after connecting to the same
database try to execute (using TAdoQuery) the following statement:
insert into table TEST (field1, field2) values ('test','two')
In my case the query executes for some time (more or less 15-20
seconds) and then exits without any exception as if it was executed
correctly!!!!
This is a big problem for me (it meas I can loose some records!!!!).
Could you please verify if you too have this problem?
Am I doing something wrong?
Any help will be really appreciated.
Tank you, Rocco.
.
- Prev by Date: not included in the present interval
- Next by Date: unspecified error - when trying to connect to ms access 2007
- Previous by thread: not included in the present interval
- Next by thread: unspecified error - when trying to connect to ms access 2007
- Index(es):
Relevant Pages
|