I can get this to work fine in SSMS...
in VB? not so much(VS2013)
error I'm trapping is:
Thoughts?
thanks lads,
Rich
in VB? not so much(VS2013)
VB.NET:
dim com as string = "select spid, substring(nt_username,1,30) nt_login," & _
"substring(loginame,1,30) db_login," & _
"substring(name,1,30) db," & _
"count(*) over() as total_users" & _
"from master..sysprocesses" & _
"inner join master..sysdatabases on master..sysdatabases.dbid = master..sysprocesses.dbid" & _
"where master..sysprocesses.program_name like 'pxxi/sqlca/%'" & _
"and master..sysprocesses.ecid = 0" & _
"group by spid,nt_username,loginame,name" & _
"order by nt_login"
error I'm trapping is:
VB.NET:
'Incorrect syntax near 'master'.
Thoughts?
thanks lads,
Rich