[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

What could cause being unable to close a Recordset?

Posted on 2001-09-16
3
Medium Priority
?
163 Views
Last Modified: 2008-03-17
    My application is MDI. I have a child form which opens a recordset on a table, keeps it open as long as the form is up, and then when the form is about to be unloaded, attempts to close the recordset.
     For some reason, in some circumstances I repeatedly get Error #3219, "Operation is not allowed in this context."
     I have two other recordsets which are also opened initially and closed at unload time, and they give me no trouble.
     I've tried a bunch of things, and have wasted over a day banging my head against this stone wall. It would sure help if someone could suggest one or more things which might cause this problem.
     Has anyone come across this particular problem before? If so, I'd appreciate your input.
0
Comment
Question by:GebhartBob
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 44

Accepted Solution

by:
bruintje earned 200 total points
ID: 6486023
Hi GebhartBob,  maybe the close of teh recordset wouldn't process because VB saw that there were changes made to the recordset, and didn't want to close it until those changes were either applied or canceled

So maybe adding a .CancelUpdate before the .Close, will solve it. If this is the case then add a dialog box to warn the user that he's about to discard changes made to the record

HTH:O)Bruintje
0
 

Author Comment

by:GebhartBob
ID: 6486093
    That's absolutely brilliant, bruintje! I just stuck in the rst.CancelUpdate before the rst.Close, and it closed very nicely!
     Now, of course, my problem is to figure out why I didn't issue a rst.Update command. I should have, but must not have.
     But now ... at last ... I have something solid to fight.
     Many, many thanks for the helping hand. You've made my life a good deal easier.
0
 
LVL 44

Expert Comment

by:bruintje
ID: 6486106
you're welcome :O)
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question