Re: Run-time Error 3704 in VB6

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Wildlife (Wildlife_at_discussions.microsoft.com)
Date: 12/08/04


Date: Wed, 8 Dec 2004 11:07:02 -0800

I am closing it because the next line opens it back up. It works for certain
users and not for others. It is consistent with which users it works for and
which ones it doesn't. I am sure it is an error with SQL SERVER - PLEASE
ASSIST

"Frank Hickman" wrote:

> Well you are closing the result set if the state is 1...perhaps that's the
> reason.
>
> --
> ============
> Frank Hickman
> NobleSoft, Inc.
> ============
> Replace the _nosp@m_ with @ to reply.
>
>
> "Wildlife" <Wildlife@discussions.microsoft.com> wrote in message
> news:0DC1A4A6-E3AF-4CFD-A6AF-CA2F7DBC4649@microsoft.com...
> > When I step through this piece of code for a user that I know has data, on
> > the second line I get the following error:
> >
> > "Run-time error '3704':
> > Operation is not allowed when the object is closed."
> >
> > cnn_DB.sp_adjust_account Me.ssn_key, rst_account_data
> > If rst_account_data.EOF Then MsgBox "Test Me"
> >
> > I get no error when running the stored procedure line of code.
> >
> >
> > "Gérard Leclercq" wrote:
> >
> >>
> >> Which error?
> >> Be sure there is data for each user
> >>
> >> If rst_account_data.Eof = False then
> >> If rst_account_data.RecordCount > 0 Then <!-HERE IS WHERE ERROR
> >> OCCURS-!>
> >> rst_account_data.MoveFirst
> >> Do Until rst_account_data.EOF
> >> End If
> >>
> >>
> >> > ...
> >> >
> >> >
> >> > At this point for certain queries it reports that "the operation is not
> >> > allowed when the object is closed."
> >> >
> >> > I assure you that the recordset is still open. Please Help! It was
> >> > working
> >> > fine I think until we upgraded to SQL 2000 a few months back
> >> >
> >>
> >>
> >>
>
>
>