I am having issue trying to obtain data from a query to MS SQL 2005 master database using a ASP to view the information. When I use management studio and run this query, I get the correct result.
When trying to implement this to write out to a asp page, the result is the machine that is hitting the DB and nothing more. This works for a MS SQL 2000 but why doesn't it work for 2005. Here is the ado snippt I am using to connect to the DB using DSN.
Code:
select hostname, count(*) from master.sys.sysprocesses group by hostname
Code:
Set objConn = server.CreateObject("ADODB.Connection")
objConn.Open "dbserver", "user", "password"
strSQL = "select hostname, count(*) as ""Connection"" from master..sysprocesses (nolock) group by hostname order by ""Connection"" desc"
Set sqlData = objConn.Execute(strSQL)
Comment