Solved

rs.Close, Runtime Error 3219 (VB6)

Posted on 2004-08-09
2
5,216 Views
Last Modified: 2012-06-27
Sorry guys, these are my last remaining points. In my program I have the code:
Private Sub Form_Load()
rs.Close
rs.Open "select * from UserNames where UserName = '" & gstUserName & "'"
rs.Fields!Grade = TeacherGrade
rs.Close <<< operation not allowed in this context, runtime error 3219
rs.Open TeacherGrade
rs.MoveFirst
Do Until rs.EOF
List1.AddItem rs.Fields!NameGrade
rs.MoveNext
Loop
End Sub

Any suggestions? and no this isn't a school project =P
0
Comment
Question by:Masterpip
2 Comments
 
LVL 18

Accepted Solution

by:
tusharashah earned 25 total points
ID: 11752012
Try "Rs.Update" or "Rs.CancelUpdate" before you close the recordset....

-tushar
0
 
LVL 16

Expert Comment

by:JohnBPrice
ID: 11755465
tusharashah is right, if you try to close a recordset which has an update pending, you get that error.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Purpose To explain how to place a textual stamp on a PDF document.  This is commonly referred to as an annotation, or possibly a watermark, but a watermark is generally different in that it is somewhat translucent.  Watermark’s may be text or graph…
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now