S
Stefan Berglund
I was looking for a general consensus as to whether the ActiveConnection property of the command
object should be set to Nothing or whether it's sufficient to set the command object itself to
nothing.
I also seem to be forced to use the Parameters.Append method, since I was unable to make the
statement Set rs = .Execute(,Array(strShowID,strSort),adCmdStoredProc) work without error.
I'm guessing that while they're both Variants, one is a numeric and the other a string? The above
statement yields :
Parameter object is improperly defined. Inconsistent or incomplete information was provided.
<%With cmd
.CommandText = "show_ShowEntries"
.Parameters.Append .CreateParameter("@Sort", adVarChar, adParamInput, 7, strSort)
Set rs = .Execute(,,adCmdStoredProc)
Set .ActiveConnection = Nothing <---- is this necessary/advisable ?
End With
Set cmd = Nothing <---- or is this sufficient ?
With rs
If (NOT .EOF) Then
Dim ar
ar = .GetRows
Set rs = .NextRecordset
Dim intTotalEntries
intTotalEntries = rs(0)
End If
End With
rs.Close: Set rs = Nothing: cn.Close: Set cn = Nothing
object should be set to Nothing or whether it's sufficient to set the command object itself to
nothing.
I also seem to be forced to use the Parameters.Append method, since I was unable to make the
statement Set rs = .Execute(,Array(strShowID,strSort),adCmdStoredProc) work without error.
I'm guessing that while they're both Variants, one is a numeric and the other a string? The above
statement yields :
Parameter object is improperly defined. Inconsistent or incomplete information was provided.
<%With cmd
.CommandText = "show_ShowEntries"
.Parameters.Append .CreateParameter("@Sort", adVarChar, adParamInput, 7, strSort)
Set rs = .Execute(,,adCmdStoredProc)
Set .ActiveConnection = Nothing <---- is this necessary/advisable ?
End With
Set cmd = Nothing <---- or is this sufficient ?
With rs
If (NOT .EOF) Then
Dim ar
ar = .GetRows
Set rs = .NextRecordset
Dim intTotalEntries
intTotalEntries = rs(0)
End If
End With
rs.Close: Set rs = Nothing: cn.Close: Set cn = Nothing