From 2d69818304a474f4ec2efbab3c6c04c3527893c4 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Tue, 10 Jan 2012 17:21:44 +0000 Subject: [PATCH] Use master.dbo.sysprocesses finally to get it running on all MS SQL versions --- source/dbconnection.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/dbconnection.pas b/source/dbconnection.pas index 7866359e..e92eb6dd 100644 --- a/source/dbconnection.pas +++ b/source/dbconnection.pas @@ -1040,7 +1040,7 @@ begin // CurCharset := CharacterSet; // Log(lcDebug, 'Characterset: '+CurCharset); FIsUnicode := True; - tmp := GetVar('SELECT DATEDIFF(SECOND, '+QuoteIdent('login_time')+', CURRENT_TIMESTAMP) FROM '+QuoteIdent('sys')+'.'+QuoteIdent('sysprocesses')+' WHERE '+QuoteIdent('spid')+'=1'); + tmp := GetVar('SELECT DATEDIFF(SECOND, '+QuoteIdent('login_time')+', CURRENT_TIMESTAMP) FROM '+QuoteIdent('master')+'.'+QuoteIdent('sys')+'.'+QuoteIdent('sysprocesses')+' WHERE '+QuoteIdent('spid')+'=1'); if tmp <> '' then FServerStarted := FConnectionStarted - MakeInt(tmp) else