Set oCmd = New ADODB.Command
With oCmd
.NamedParameters = True
.CommandType = adCmdStoredProc
.CommandText = "uspDeleteSavedCriteria"
.Parameters.Append .CreateParameter("xuSavedCriteriaUID", adGUID, adParamInput, , msSavedCriteriaUID)
.ActiveConnection = xoConn
.Execute
End With
The namedparameters property is new with ado 2.6 and speeds up stored proc calls if you know how to build the parameters for the call. If you don't you can try this:
Set oCmd = New ADODB.Command
With oCmd
.ActiveConnection = xoConn
.CommandType = adCmdStoredProc
.CommandText = "uspDeleteSavedCriteria"
.Parameters.Refresh
.Parameters("xuSavedCriteriaUID".value = msSavedCriteriaUID
.Execute
End With
But it takes an extra trip to the database to fill the parameters collection for you (=Slower).
Hope this helps. -Chris Didion
Matrix Automation, MCP
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.