E
EManning
Using A2K. I have the following code:
Dim rstSSN As ADODB.Recordset
Set cmd = New ADODB.Command
Set cmd.ActiveConnection = cnn
cmd.CommandType = adCmdStoredProc
cmd.CommandText = "spFindResidentInRotation"
Set prm = cmd.CreateParameter("@AcademicYear", adVarChar, adParamInput,
9, _
Me.cboAcademicYear.Column(1))
cmd.Parameters.Append prm
Set prm = cmd.CreateParameter("@SSN", adVarChar, adParamInput, 9, _
Me.cboResidents.Column(0))
cmd.Parameters.Append prm
Set rstSSN = cmd.Execute()
If rstSSN.BOF And rstSSN.EOF Then
<snip>
End If
I get a 3704 error "operation is not allowed when the object is closed".
Can someone tell me why I'm getting this error, please? I have similar
coding in another part of my adp that works just fine.
Thanks for any help or advice.
Dim rstSSN As ADODB.Recordset
Set cmd = New ADODB.Command
Set cmd.ActiveConnection = cnn
cmd.CommandType = adCmdStoredProc
cmd.CommandText = "spFindResidentInRotation"
Set prm = cmd.CreateParameter("@AcademicYear", adVarChar, adParamInput,
9, _
Me.cboAcademicYear.Column(1))
cmd.Parameters.Append prm
Set prm = cmd.CreateParameter("@SSN", adVarChar, adParamInput, 9, _
Me.cboResidents.Column(0))
cmd.Parameters.Append prm
Set rstSSN = cmd.Execute()
If rstSSN.BOF And rstSSN.EOF Then
<snip>
End If
I get a 3704 error "operation is not allowed when the object is closed".
Can someone tell me why I'm getting this error, please? I have similar
coding in another part of my adp that works just fine.
Thanks for any help or advice.