Re: MS SQL 2000, ADO and edit lock
- From: "Eugene V. Goldberg" <egold@xxxxxxxxx>
- Date: Mon, 3 Dec 2007 17:55:24 +0300
I have the following code
procedure TForm1.Button1Click(Sender: TObject);
begin
with ADODataSet1 do
begin
LockType := ltPessimistic;
CommandText := 'SELECT * FROM INC_HEAD WITH (HOLDLOCK, ROWLOCK) WHERE ID
= 43620';
try
Open
except
on E: Exception do
ShowMessage('Exception: ' + E.Message)
end
end
end;
I launch the first instance of app, click Button1, the row is shown in the
Grid.
Then I launch the second instance, click Button1 and it hangs for about 30
seconds or so,
and then empty grid is shown.
CursorLocation is set to clUseServer.
Is there a way to avoid the delay and have it immediately raise an
exception?
"Del Murray" <Del.Murray@xxxxxxxxxxxxxx> wrote in message
news:4754122e@xxxxxxxxxxxxxxxxxxxxxxxxx
.
- Follow-Ups:
- Re: MS SQL 2000, ADO and edit lock
- From: Del Murray
- Re: MS SQL 2000, ADO and edit lock
- References:
- MS SQL 2000, ADO and edit lock
- From: Eugene V. Goldberg
- Re: MS SQL 2000, ADO and edit lock
- From: Del Murray
- Re: MS SQL 2000, ADO and edit lock
- From: Eugene V. Goldberg
- Re: MS SQL 2000, ADO and edit lock
- From: Del Murray
- MS SQL 2000, ADO and edit lock
- Prev by Date: sorry once more in english: sql : little differences big effects ??
- Next by Date: Re: MS SQL 2000, ADO and edit lock
- Previous by thread: Re: MS SQL 2000, ADO and edit lock
- Next by thread: Re: MS SQL 2000, ADO and edit lock
- Index(es):