Is there any way of reading the database name using QSRules?
The Session.ConnectionInfo object would be an obvious place, but I get "Object doesn't support this property or method" when I try to access the InitialCatalog property...
Is there any way of reading the database name using QSRules?
The Session.ConnectionInfo object would be an obvious place, but I get "Object doesn't support this property or method" when I try to access the InitialCatalog property...
Simon,
Could try the following SQL:-
declare @dbname as varchar(32) select @dbname = db_name() print @dbname
R.
set rs = Session.OpenRecordset("SELECT GetDate()", true)
rs is an ADODB.Recordset
You can take it from there...
Glenn Adams Tiber Creek C> Is there any way of reading the database name using QSRules?
Have something to add? Share your thoughts — no account required.
Ask the community — no account required