473,418 Members | 2,174 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 software developers and data experts.

"non-reentrant method"?

For some reason when I call validateFields before .Update (see below), I get
this error: "Consumer's even handler called a non-reentrant method in the
provider"

However if I comment out the call to validateFields, all is fine.

What could possibly cause this error? What is a non-reentrant method?

Private Sub cmdChangeInstruct_Click()
Call validateFields
adorecordset.Update

StudentCode = txtStudentCode
frmChangeInstruct.Show (vbModal)
End Sub

Private Sub validateFields()
While txtFirstName.Text = Empty
txtFirstName.Text = InputBox("Please enter a first name:", "Invalid
data")
Wend
End Sub
Jul 17 '05 #1
2 3728

"Adrian Parker" <ad***********@NOSPAMsympatico.ca> wrote in message
news:le*******************@news20.bellglobal.com.. .
For some reason when I call validateFields before .Update (see below), I get this error: "Consumer's even handler called a non-reentrant method in the provider"

However if I comment out the call to validateFields, all is fine.

What could possibly cause this error? What is a non-reentrant method?


What, you don't speak double-speak? <g>

The "provider" is presumably referring to your OLEDB provider, which is
maybe Jet or SQL Server or something. The "consumer" is your data
consumer, i.e. your recordset, i.e. you.

Non-reentrant means that something called a method in the provider,
which then called your code, which now tries to call the provider again,
but it can't be called again till the first one is done.

Which means probably you have some edit pending in bound fields, and
then while validating fields you are creating a new pending edit in the
recordset, or something like that.

The usual solution is for validation to check and return true or false,
but not to edit data itself. Pop up a message saying "Fill in a first
name before changing instructors", and then let them complete or cancel
their edit back on the main form.

Jul 17 '05 #2

"Steve Gerrard" <no*************@comcast.net> wrote in message
news:G8********************@comcast.com...

"Adrian Parker" <ad***********@NOSPAMsympatico.ca> wrote in message
news:le*******************@news20.bellglobal.com.. .
For some reason when I call validateFields before .Update (see below),

I get
this error: "Consumer's even handler called a non-reentrant method in

the
provider"

However if I comment out the call to validateFields, all is fine.

What could possibly cause this error? What is a non-reentrant method?


What, you don't speak double-speak? <g>

The "provider" is presumably referring to your OLEDB provider, which is
maybe Jet or SQL Server or something. The "consumer" is your data
consumer, i.e. your recordset, i.e. you.

Non-reentrant means that something called a method in the provider,
which then called your code, which now tries to call the provider again,
but it can't be called again till the first one is done.

Which means probably you have some edit pending in bound fields, and
then while validating fields you are creating a new pending edit in the
recordset, or something like that.

The usual solution is for validation to check and return true or false,
but not to edit data itself. Pop up a message saying "Fill in a first
name before changing instructors", and then let them complete or cancel
their edit back on the main form.


Ha, it's a bug, found this in the MSDN:

http://support.microsoft.com/default...;en-us;Q195638

Adrian
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: mirnazim | last post by:
Hi, There are great Python Web Application Framework. But most of them are meant for content oriented web apps. Is there something that can ease the development of application that are not...
1
by: JKop | last post by:
Would you classify the following code as "Undefined Behaviour" or as "Non- portable"? signed main() { signed char chedder = 130; } Relevant information:
1
by: Mat DeLong | last post by:
Can someone explain this error to me? : main.cpp:9: instantiated from `void show(const LIST::List<T>&) ' main.cpp:23: instantiated from here list.cpp:58: error: dependent-name...
15
by: Sander Tekelenburg | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The HTML specs speak of "replaced" and "non-replaced" elements, yet for the life of me I can't find an explanation of what "replaced" is supposed...
0
by: Robert Oschler | last post by:
I have a database table with a field that is indexed as a "full-text" search, since I want the capabiity. However, I also want the ability to quickly retrieve records from that table that are ins...
0
by: Brent | last post by:
If my field has something like this: 1. dez 2. eft 3. 4. hgt 5. Is there any way to put the non-blank fields on top, sorted alphabetically A-Z, and the blank fields on bottom in...
8
by: Bern McCarty | last post by:
Is it at all possible to leverage mixed-mode assemblies from AppDomains other than the default AppDomain? Is there any means at all of doing this? Mixed-mode is incredibly convenient, but if I...
2
by: thorax | last post by:
I'm having problems running a release build of an application. The application is a native C++ .NET 2003 MFC application which links to a number of other DLLs, one of which is mixed (SLGSE.dll)...
3
by: Pierre Barbier de Reuille | last post by:
Hi, after reading the article " The Standard Librarian : Defining Iterators and Const Iterators" from Matt Austern:...
1
by: =?Utf-8?B?QWxleCBNYWdoZW4=?= | last post by:
Hi. I have Mobile site that I'm building. My problem is that all of my pages are built as Mobile ASPX pages, but occasionally, I need to use controls which are not mobile. Most specifically, the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.