03-19-2013, 12:41 PM
Hi borisk,
try the below code, hope it will resolve your issue
try the below code, hope it will resolve your issue
Code:
Set objDB = CreateObject("ADODB.Connection")
strDSN = "DRIVER=SQL Server; DATABASE=[databasename];APP=QuickTest Professional;SERVER=[servername];Description=Testconnection"
objDB.Open(strDSN)
Set objRec = objDB.Execute("exec [spname] '[param1]','[param2'")
Do Until objRec.EOF
Msgbox objRec.Fields("[column]")
objRec.MoveNext
Loop
Set objRec = Nothing
Set objDB = Nothing