Solved

rs.Close, Runtime Error 3219 (VB6)

Posted on 2004-08-09
2
5,263 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

A short article about problems I had with the new location API and permissions in Marshmallow
This is about my first experience with programming Arduino.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
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 …

943 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

16 Experts available now in Live!

Get 1:1 Help Now