I'm using Munin ( to monitor my servers. It is a Linux monitoring tool, but there is a Windows module available.
One of the items I want to monitor is how many records are contained in a certain table on an MSSQL server. I have a basic idea of how to connect from searching through this forum and googling for other help, but I'm stuck.
The error is on the line "MsgBox strWatchFile" line, the error is "Wrong number of arguments or invalid property assignment".
When I run the "select count (*) from watchfile" in SQL Mgmt Studio, it returns an integer value. I need to know how to get the integer value into the variable so I can have my way with it.
Thanks!!!
h
One of the items I want to monitor is how many records are contained in a certain table on an MSSQL server. I have a basic idea of how to connect from searching through this forum and googling for other help, but I'm stuck.
Code:
Option Explicit
Dim objConnection, strWatchFile
Set objConnection = CreateObject("ADODB.Connection")
objConnection.Open "Provider=SQLOLEDB.1;Data Source=vanc-sql02\enterprisevault;Initial Catalog=EVJournalStore1","xxxxx","yyyyy"
strWatchFile = objConnection.Execute("select count (*) from watchfile")
MsgBox strWatchFile
Set objConnection = Nothing
The error is on the line "MsgBox strWatchFile" line, the error is "Wrong number of arguments or invalid property assignment".
When I run the "select count (*) from watchfile" in SQL Mgmt Studio, it returns an integer value. I need to know how to get the integer value into the variable so I can have my way with it.
Thanks!!!
h