http://technet.microsoft.com/en-us/libr ... 89470.aspx
http://msdn.microsoft.com/en-us/library/ms182729.aspx
http://msdn.microsoft.com/en-us/library/ms177413.aspx
I got "Lock request time-out period exceeded" errors and was pretty sure there is no way they could occour, since I didn't touch this setting. By testing I found out that SDAC 4 sets it to 2000.
For now and in case it's not a bug I will just set LOCK_TIMEOUT to -1 after every connect.
The following code will show these messages (Delphi 5, SQL Server 2008):
Compiled against version 4.80.0.60 (not expected): '2000'
Compiled against version 3.80.0.36 (expected): '-1'
Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
var
Con: TMSConnection;
Query: TMSQuery;
begin
Query := nil;
Con := TMsConnection.Create(nil);
try
Con.Server := 'LOCALHOST\SQLEXPRESS';
Con.Username := 'sa';
Con.Password := '';
Con.Connect;
Query := TMsQuery.Create(nil);
Query.Connection := Con;
Query.SQL.Text := 'SELECT @@LOCK_TIMEOUT';
Query.Active := True;
if not Query.Eof then
ShowMessage(Query.Fields[0].Value);
finally
Query.Free;
Con.Free;
end;
end;