This is one of the traps when using Connection.Execute() to create a
recordset.  If the query does not return any data, it also does not
instantiate the result set.  Use a Recordset.Open instead, or check for
existence of the recordset (If Not <Recordset> Is Nothing Then).

HTH,
Tore.


----- Original Message -----
From: "Steve Abaffy" <[EMAIL PROTECTED]>
To: "ActiveServerPages" <[EMAIL PROTECTED]>
Sent: Tuesday, November 05, 2002 12:16 PM
Subject: Wierd Recordset problem


> Hello
>
> The following code
>
> SQL = "Execute usp_FetchServiceTerminations  @a_szAuthcode='" & AuthCode &
> "',@a_StartDate='" & GetTwoDigitDate(StartDate) & "',@a_EndDate='" &
> GetTwoDigitDate(EndDate) & "'"
> SET GCRS = ConnCDI.Execute(SQL)
> Response.write "<table border=""1"">" & vbCRLF
> Response.write "<tr>" & vbCRLF
> Response.write "<td class=""tblHeader"" colspan=""5"">Cancellations for "
&
> StartDate & " - " & EndDate & "</td>"
> Response.write "<tr>" & vbCRLF
> IF GCRS.EOF or GCRS.BOF THEN
>
> the line above generates
> Cancellations for 11/01/2002 - 11/30/2002
> ADODB.Recordset error '800a0e78'
> Operation is not allowed when the object is closed.
>
> /includes/ReportFunctions.inc, line 30
>
>
> Any ideas. Obviously I do not close the recordset or set it equal to
> nothing, so I do not understand the error.
>
> Steve Abaffy
> IT Director
> CDI Telecom
> 972-503-6600 ext 2223
>
>
>
> ---
> You are currently subscribed to activeserverpages as:
[EMAIL PROTECTED]
> To unsubscribe send a blank email to
%%email.unsub%%
>


---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to