Free for PREMIUM members
Go Premium for a chance to win a PS4. Enter to Win
We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
' Use a Sub instead of a Function as it does not appear to return any values
Public Sub RunStoredProcedureUserNameAndOneParam(MySP As String, UserName As String, Param1 As Double)
Dim MyCmd As ADODB.Command ' Do not use New here.
Set MyCmd = New ADODB.Command ' Initialize it here
.ActiveConnection = GetConnectionString()
.CommandType = adCmdStoredProc
' Command Text
.CommandText = MySP
' UserName Parameter
.Parameters.Append .CreateParameter("@UserName", adVarChar, adParamInput, 50, UserName)
' Parameter 1
.Parameters.Append .CreateParameter("@Param1", adVarChar, adParamInput, 50, Param1)
.CommandTimeout = 500 ' Do you really want to wait 8 minutes? This seems excessive
' You are not closing here, just disposing of the memory used by MyCmd
Set MyCmd = Nothing
Open in new window
Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.