CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2000
    Posts
    27

    Non-reentrant method !!

    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



  2. #2
    Join Date
    Aug 2000
    Location
    England
    Posts
    185

    Re: Non-reentrant method !!

    if you post your code I will have a look


  3. #3
    Join Date
    Jun 2000
    Posts
    27

    Re: Non-reentrant method !!

    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 .


  4. #4
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: Non-reentrant method !!

    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
    [email protected]

    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
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

  5. #5
    Join Date
    Jun 2000
    Posts
    27

    Re: Non-reentrant method !!

    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 ?


  6. #6
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Re: Non-reentrant method !!

    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.
    ...at present time, using mainly Net 4.0, Vs 2010



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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured