Ado and lock timeout error: is it a bug or it's my fault?



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.

.



Relevant Pages

  • Re: Asynchronous Threading Issue
    ... callbacks is that if I use a callback function it will execute on a ... if I use a callback function ... I want to call BeginConnect so that I try to connect without holding up ... but if there's an error connecting I want to ...
    (microsoft.public.dotnet.general)
  • Re: All Quantifier
    ... The working code: ... :- dynamic done/1. ... % black_edge and so black_conn connecting two processes ... % Now A shall also be required in order to execute C: ...
    (comp.lang.prolog)
  • Re: No results from query in some contexts
    ... maybe even read permission on that table as well. ... ensure you are connecting and executing that proc as you expect. ... > If I execute this sproc from SQL Server Management studio connected to the ... > If I open up the table in visual studio 2005 I see the records. ...
    (microsoft.public.sqlserver.security)
  • Re: Asynchronous Threading Issue
    ... > callbacks is that if I use a callback function it will execute on a ... if I use a callback function ... > execution on the main thread, but if there's an error connecting I want to ... > which leads me to suspect the way BeginConnect operates ??? ...
    (microsoft.public.dotnet.general)
  • Re: Some question about FixServerRoleMember
    ... It looks like your customer removed the public execute permissions on this ... This will prevent securityadmin role members from executing the proc. ... > i meet a stranger problem when i use sqlserver fix ServerRoleMember. ...
    (microsoft.public.sqlserver.security)