Re: Recordset or Object is closed HELP PLEASE!
From: mikemalachy (mikemalachy_at_yahoo.com)
Date: 06/11/04
- Next message: Gjones: "Enclosing values in Quotation marks"
- Previous message: OkieViking: "RE: Working with a combobox"
- In reply to: DBAL: "Re: Recordset or Object is closed HELP PLEASE!"
- Messages sorted by: [ date ] [ thread ]
Date: 11 Jun 2004 06:40:34 -0700
DBAL,
Are you sure that in all instances of the SQL statement, you will
actually have a resultset? I have had this problem before and it
occurred when my statement returned no data. My workaround was to
check if recordset = nothing before referencing it.
Good luck.
"DBAL" <dba@biofilm.com> wrote in message news:<1a7d201c44f04$009254f0$a601280a@phx.gbl>...
> Thanks.
> I need to find out more about how to do a Stored
> Procedure. I have done some isolation to find out what
> is causing the error. The code runs fine with a
> different query that is simpler. The main difference is
> that this query Declares Variables and Sets those
> variables to system times and dates. This is definitely
> where the problem lies. It won't return a recordset with
> a query that has Declare Statments. Or atleast that is
> what I have narrowed it down to so far. The Stored
> Procedure idea must be the only way because passing the
> SQL Server the query is giving me that error:'3704'
> Operation is not allowed when the object is closed.
>
> DBAL
>
>
>
> >-----Original Message-----
> >"DBAL" <dba@biofilm.com> wrote ...
> >
> >> Jamie, thank you for your reply.
> >> When I run the SQL in Query Analyzer it seems to run
> >> fine. I'm not sure why it wouldn't create a
> resultset.
> >> Does it not create a recordset to be returned to excel
> >> when there is definitely are query returned in Query
> >> Analzyer at the SQLSERVER? I'm not sure anymore I
> guess:
> >>
> >> Here is the SQL:
> >>
> >> <snip>
> >
> >Eek! The query from hell!
> >
> ><More politely> I have no experience of executing that
> kind of T-SQL
> >text from a client (e.g. Excel). I'd expect it to be
> wrapped in a
> >stored procedure on the server and the stored proc
> executed from the
> >client.
> >
> >Jamie.
> >
> >--
> >.
> >
- Next message: Gjones: "Enclosing values in Quotation marks"
- Previous message: OkieViking: "RE: Working with a combobox"
- In reply to: DBAL: "Re: Recordset or Object is closed HELP PLEASE!"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|