DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 9 of 9

Thread: Runtime Error

  1. #1
    Joseph Marcelo Guest

    Runtime Error


    I open my recordset in my data entry window using the recordset created in
    DED. When i preview/print my report and close the data entry window and open
    it again, i get this error "Runtime error <numbers>. An object was open".

    Can you help me debug this error. Thanks alot.

    Joseph


  2. #2
    Becky Guest

    Re: Runtime Error


    "Joseph Marcelo" <jvmarcelo@euromarche.com> wrote:
    >
    >I open my recordset in my data entry window using the recordset created

    in
    >DED. When i preview/print my report and close the data entry window and

    open
    >it again, i get this error "Runtime error <numbers>. An object was open".
    >
    >Can you help me debug this error. Thanks alot.
    >
    >Joseph
    >


    I'm not sure if this can help:

    Try to check if the recordset is closed properly after the operation. Probably
    your recordset was openned and not closed properly. So, when you try to open
    it second time, it generates an error.

    Hope this help

    Becky


  3. #3
    Joseph Guest

    Re: Runtime Error


    thanks becky for the help...
    but unfortunately i've tried that also and i still get the same error. on
    the form's load event, i am opening my recordset using
    <de-object>.<recordset created by command>.Open
    and on the form's unload event, i am using
    <de-object>.<recordset created by command>.Close
    and on the data report's terminate event, i am closing the recordset associated
    with the datareport object by
    <de-object>.<recordset created by command for my report>.Close

    every time i run the report and close my data entry window and go back to
    it again, i am getting this error.
    "Runtime error "-2147217915 (80040e05)
    An object was open" pointing to the open method of the recordset in the form's
    load event

    thanks....

    joseph

    "Becky" <boeykean@hotmail.com> wrote:
    >
    >"Joseph Marcelo" <jvmarcelo@euromarche.com> wrote:
    >>
    >>I open my recordset in my data entry window using the recordset created

    >in
    >>DED. When i preview/print my report and close the data entry window and

    >open
    >>it again, i get this error "Runtime error <numbers>. An object was open".
    >>
    >>Can you help me debug this error. Thanks alot.
    >>
    >>Joseph
    >>

    >
    >I'm not sure if this can help:
    >
    >Try to check if the recordset is closed properly after the operation. Probably
    >your recordset was openned and not closed properly. So, when you try to

    open
    >it second time, it generates an error.
    >
    >Hope this help
    >
    >Becky
    >



  4. #4
    Becky Guest

    Re: Runtime Error


    Hi, Joseph,
    I have a strong feeling that your error is due to the recordset object already
    open and not close properly through you have written the .close command.
    PErhaps you can try to set the recordset to nothing in the form unload event?
    Please check the recordset object again. Or may be it is better if you can
    attached the section of your related code here.

    Hope this help.

    Becky

    "Joseph" <jvmarcelo@euromarche.com> wrote:
    >
    >thanks becky for the help...
    >but unfortunately i've tried that also and i still get the same error. on
    >the form's load event, i am opening my recordset using
    > <de-object>.<recordset created by command>.Open
    >and on the form's unload event, i am using
    > <de-object>.<recordset created by command>.Close
    >and on the data report's terminate event, i am closing the recordset associated
    >with the datareport object by
    > <de-object>.<recordset created by command for my report>.Close
    >
    >every time i run the report and close my data entry window and go back to
    >it again, i am getting this error.
    >"Runtime error "-2147217915 (80040e05)
    >An object was open" pointing to the open method of the recordset in the

    form's
    >load event
    >
    >thanks....
    >
    >joseph
    >
    >"Becky" <boeykean@hotmail.com> wrote:
    >>
    >>"Joseph Marcelo" <jvmarcelo@euromarche.com> wrote:
    >>>
    >>>I open my recordset in my data entry window using the recordset created

    >>in
    >>>DED. When i preview/print my report and close the data entry window and

    >>open
    >>>it again, i get this error "Runtime error <numbers>. An object was open".
    >>>
    >>>Can you help me debug this error. Thanks alot.
    >>>
    >>>Joseph
    >>>

    >>
    >>I'm not sure if this can help:
    >>
    >>Try to check if the recordset is closed properly after the operation. Probably
    >>your recordset was openned and not closed properly. So, when you try to

    >open
    >>it second time, it generates an error.
    >>
    >>Hope this help
    >>
    >>Becky
    >>

    >



  5. #5
    Joseph Guest

    Re: Runtime Error


    thanks becky for giving this problem some of your time. i tried setting the
    recordset to nothing but it an error saying
    "Invalid use of property"...

    Following are sections of my code.

    Private Sub Form_Load()

    deEuroFAS.rscmUsers.Open
    ....
    ....
    End Sub

    Private Sub Form_Unload(Cancel As Integer)
    deEuroFAS.rscmUsers.Close
    Call SaveRegistry("EuroFAS", "Users", MeWinProp, Me)
    End Sub

    Private Sub DataReport_Terminate()
    SetPrinterOrientation Me.Tag
    deEuroFAS.rscmUsersList.Close
    'you can not set this recordset to nothing
    'it generates an error invalid use of property
    End Sub

    is there a way of knowing which objects or recordsets are currently open?

    thanks again.
    Joseph

    "Becky" <boeykean@hotmail.com> wrote:
    >
    >Hi, Joseph,
    >I have a strong feeling that your error is due to the recordset object already
    >open and not close properly through you have written the .close command.
    >PErhaps you can try to set the recordset to nothing in the form unload event?
    >Please check the recordset object again. Or may be it is better if you can
    >attached the section of your related code here.
    >
    >Hope this help.
    >
    >Becky
    >
    >"Joseph" <jvmarcelo@euromarche.com> wrote:
    >>
    >>thanks becky for the help...
    >>but unfortunately i've tried that also and i still get the same error.

    on
    >>the form's load event, i am opening my recordset using
    >> <de-object>.<recordset created by command>.Open
    >>and on the form's unload event, i am using
    >> <de-object>.<recordset created by command>.Close
    >>and on the data report's terminate event, i am closing the recordset associated
    >>with the datareport object by
    >> <de-object>.<recordset created by command for my report>.Close
    >>
    >>every time i run the report and close my data entry window and go back

    to
    >>it again, i am getting this error.
    >>"Runtime error "-2147217915 (80040e05)
    >>An object was open" pointing to the open method of the recordset in the

    >form's
    >>load event
    >>
    >>thanks....
    >>
    >>joseph
    >>
    >>"Becky" <boeykean@hotmail.com> wrote:
    >>>
    >>>"Joseph Marcelo" <jvmarcelo@euromarche.com> wrote:
    >>>>
    >>>>I open my recordset in my data entry window using the recordset created
    >>>in
    >>>>DED. When i preview/print my report and close the data entry window and
    >>>open
    >>>>it again, i get this error "Runtime error <numbers>. An object was open".
    >>>>
    >>>>Can you help me debug this error. Thanks alot.
    >>>>
    >>>>Joseph
    >>>>
    >>>
    >>>I'm not sure if this can help:
    >>>
    >>>Try to check if the recordset is closed properly after the operation.

    Probably
    >>>your recordset was openned and not closed properly. So, when you try to

    >>open
    >>>it second time, it generates an error.
    >>>
    >>>Hope this help
    >>>
    >>>Becky
    >>>

    >>

    >



  6. #6
    Jim Edgar Guest

    Re: Runtime Error

    Joseph --

    This might be your problem.

    > Private Sub Form_Unload(Cancel As Integer)
    > deEuroFAS.rscmUsers.Close
    > Call SaveRegistry("EuroFAS", "Users", MeWinProp, Me)
    > End Sub
    >


    In your Form_Unload event you reference the form (me) which causes
    your form to reload (but remains hidden). Try putting a breakpoint at
    the line:

    deEuroFAS.rscmUsers.Close

    and step through the code to see if the Form_Load event fires
    again. You may have to change your SaveRegistry() call use
    variables instead of the Me keyword.

    Hope it helps,

    Jim Edgar



  7. #7
    Becky Guest

    Re: Runtime Error


    Thanks, Jim.
    Joseph, would you mind to feedback to us if what Jim has suggested work?
    Thanks.

    Becky

    "Jim Edgar" <djedgar@home.com> wrote:
    >Joseph --
    >
    >This might be your problem.
    >
    >> Private Sub Form_Unload(Cancel As Integer)
    >> deEuroFAS.rscmUsers.Close
    >> Call SaveRegistry("EuroFAS", "Users", MeWinProp, Me)
    >> End Sub
    >>

    >
    >In your Form_Unload event you reference the form (me) which causes
    >your form to reload (but remains hidden). Try putting a breakpoint at
    >the line:
    >
    >deEuroFAS.rscmUsers.Close
    >
    >and step through the code to see if the Form_Load event fires
    >again. You may have to change your SaveRegistry() call use
    >variables instead of the Me keyword.
    >
    >Hope it helps,
    >
    >Jim Edgar
    >
    >



  8. #8
    Joseph Guest

    Re: Runtime Error


    "Jim Edgar" <djedgar@home.com> wrote:
    >Joseph --
    >
    >This might be your problem.
    >
    >> Private Sub Form_Unload(Cancel As Integer)
    >> deEuroFAS.rscmUsers.Close
    >> Call SaveRegistry("EuroFAS", "Users", MeWinProp, Me)
    >> End Sub
    >>

    >
    >In your Form_Unload event you reference the form (me) which causes
    >your form to reload (but remains hidden). Try putting a breakpoint at
    >the line:
    >
    >deEuroFAS.rscmUsers.Close
    >
    >and step through the code to see if the Form_Load event fires
    >again. You may have to change your SaveRegistry() call use
    >variables instead of the Me keyword.
    >
    >Hope it helps,
    >
    >Jim Edgar
    >
    >

    thanks jim, i tried that but form_load event does not fire with the saveregistry()
    call. i have managed to solve the problem though by creating my recordset
    in code instead of using the recordset created by the connection -> command
    in DED.

    do you have any idea what could be wrong in my DED recordset?


  9. #9
    Becky Guest

    Re: Runtime Error


    Hi, Joseph,

    Glad you have managed to solve your problem. Unfortunately I have no idea
    what went wrong with your DED recordset But I'm sure must be somewhere wrong
    in there.
    By the way, I'm not quite sure what do you mean by DED? I would be much appreciated
    if you could briefly explain it. WOuld you?

    Thank you.
    Bye.
    Becky
    "Joseph" <jvmarcelo@euromarche.com> wrote:
    >
    >"Jim Edgar" <djedgar@home.com> wrote:
    >>Joseph --
    >>
    >>This might be your problem.
    >>
    >>> Private Sub Form_Unload(Cancel As Integer)
    >>> deEuroFAS.rscmUsers.Close
    >>> Call SaveRegistry("EuroFAS", "Users", MeWinProp, Me)
    >>> End Sub
    >>>

    >>
    >>In your Form_Unload event you reference the form (me) which causes
    >>your form to reload (but remains hidden). Try putting a breakpoint at
    >>the line:
    >>
    >>deEuroFAS.rscmUsers.Close
    >>
    >>and step through the code to see if the Form_Load event fires
    >>again. You may have to change your SaveRegistry() call use
    >>variables instead of the Me keyword.
    >>
    >>Hope it helps,
    >>
    >>Jim Edgar
    >>
    >>

    >thanks jim, i tried that but form_load event does not fire with the saveregistry()
    >call. i have managed to solve the problem though by creating my recordset
    >in code instead of using the recordset created by the connection -> command
    >in DED.
    >
    >do you have any idea what could be wrong in my DED recordset?
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center