Click to See Complete Forum and Search --> : Non-reentrant method !!


Cris Bossee
May 16th, 2001, 04:40 AM
Hi all,

I'm adjusting an existing program in VB with an Access db in order to function with SQL db.

When I try to use the update method , I get this message : "Consumer's event handler called a non-reentrant method in the provider."
I have really no idea what could be wrong with the source.
Between the addnew and the update function, I have some statements to fill up some fields on the recordset itself and also some objects on my screen which are connected with the same recordset.

All of this was functioning with access db , so why not with sql db ?????
I getting crazy to look for a solution !
Can anyone help or explain what this message means ?


Thanks,

Cris Bossee

Andrew_Fryer
May 16th, 2001, 05:23 AM
if you post your code I will have a look

Cris Bossee
May 16th, 2001, 05:29 AM
datprimaryrs.Recordset.AddNew
datprimaryrs.Recordset!groupfile = "N"

' Check1.Value = False
datprimaryrs.Recordset!filinggroup = zanr
datprimaryrs.Recordset!zanr = zanr

Text6.Text = datprimaryrs.Recordset!filinggroup

Combo2.Text = "New"
datprimaryrs.Recordset.Update

I get the error on the update statement .

Cakkie
May 16th, 2001, 05:31 AM
The non-reentrant error has got something to do with SQL server. Stored procedures are non-reentrant, this means every time you need it, SQL makes an object, runs it, and destroys it. This also means that when you run the same procedure twice at the same time, their will be two objects. Still no problem here. It's just when in some surcomstamnces, the execution plan of the stored procedure isn't available. The most common reason for this is when you define a procedure WITH RECOMPILE. When its compilingm the plan isn't accessible. This means if the same procedure is run at the same time, the second procedure will fail, because the first one is still compiling.
There are other reasons why this can occur, but i'm affraid that this matter is way underdocumented.

Tom Cannaerts
slisse@planetinternet.be

Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook

Cris Bossee
May 16th, 2001, 05:50 AM
I understand what you were explaining but the thing is that i'm not using any stored procedure.
It's just a plain table and I thought a straightforward add.

Some people had same experience ?

Cimperiali
May 16th, 2001, 08:58 AM
May be I am out of topic, but let me suggest to chek for connection mode (=1=admoderead, 2=admodewrite,3 admodereadwrite...) just to see if you can actually update...

Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood Bruno Paris and all the other wonderful people who made and make Codeguru a great place. Come back soon, you Gurus.