I am using SQL SERVER 2000
and MDAC 2.7
Connection made are through System DSN
using SQL Server Drivers
************* CODE *****************
Dim objCmd
Dim objRS
Dim lng_Counter
Dim arrParam
g_strLastSP = strSP
Set objRS = server.CreateObject("ADODB.RecordSet"

Set objCmd = server.CreateObject("ADODB.Command"
With objCmd
On Error Resume Next
.ActiveConnection = m_strConnectionString
.CommandTimeOut = 3000
if Err.number <> 0 then
SendMessage "Cannot open database on connection '" & m_strConnectionString & "'", "DBConnection.RunSP"
end if
On Error Goto 0
.CommandType = adCmdStoredProc
.CommandText = strSP
End With
' Attach parameters
Call AttachParams(objCmd, arrParams)
On error resume next
With objRS
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.LockType = adLockBatchOptimistic
' Run the command
.Open objCmd
if err.number <> 0 then
SendMessage Err.number & " : " & Err.Description
end if
On Error goto 0
end if
End With
on error goto 0
Set objCmd = Nothing