found what i was looking for
'**********************************************************************
' Visual Basic ActiveX Script
'**********************************************************************
Function Main()
Dim objRs
Dim objConn
Dim strSql
Dim strHtml
Set objConn = CreateObject("ADODB.Connection")
objConn.Open "Provider=SQLOLEDB;Data Source=(local);Trusted_Connection=yes;Initial Catalog=Northwind"
strSql = "Select count(*) from table where condition"
'--- //Method 1 : Using Execute Method of Connection Object
'--- Set objRs=objConn.Execute(strSql)
'--- //
'*** /// OR ///****
'//Method 2 : Using Execute Method of Connection Object
Set objRs = CreateObject("ADODB.Recordset")
objRs.Open strSql, objConn
'//