Introduce TSQLSpecifity and TDBConnection.GetSQLSpecifity(), which manage and return server version specific SQL snippets. Fixes issue #2796.

This commit is contained in:
Ansgar Becker
2012-03-25 21:42:52 +00:00
parent 72acd369e5
commit a685ff292b
2 changed files with 52 additions and 28 deletions

View File

@ -8414,8 +8414,8 @@ begin
', RTRIM('+Conn.QuoteIdent('p')+'.'+Conn.QuoteIdent('status')+'), '+
'NULL AS '+Conn.QuoteIdent('Info')+' '+
'FROM '+Conn.QuoteIdent('sys')+'.'+Conn.QuoteIdent('sysprocesses')+' AS '+Conn.QuoteIdent('p')+
', '+Conn.QuoteIdent('sys')+'.'+Conn.QuoteIdent('sysdatabases')+' AS '+Conn.QuoteIdent('d')+
' WHERE '+Conn.QuoteIdent('p')+'.'+Conn.QuoteIdent('dbid')+'='+Conn.QuoteIdent('d')+'.'+Conn.QuoteIdent('dbid')
', '+Conn.GetSQLSpecifity(spDatabaseTable)+' AS '+Conn.QuoteIdent('d')+
' WHERE '+Conn.QuoteIdent('p')+'.'+Conn.QuoteIdent('dbid')+'='+Conn.QuoteIdent('d')+'.'+Conn.GetSQLSpecifity(spDatabaseTableId)
);
end;
end;