How to read the database name using QSRules?

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...

Reply to
Simon
Loading thread data ...

Simon,

Could try the following SQL:-

declare @dbname as varchar(32) select @dbname = db_name() print @dbname

R.

Reply to
RSB

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?

Reply to
Glenn Adams [MVP - Retail Mgmt]

BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.