Re: ViewState + AutoIncrement -- Okay; Session + AutoIncrement -- Not okay

Discussion in 'ASP .Net' started by Gene Gorokhovsky, Jul 17, 2003.

  1. try calling the following function

    private static void KludgeAutoIncrement(DataColumn dc, int value)
    {
    try
    {
    System.Reflection.BindingFlags bf =
    System.Reflection.BindingFlags.Public |
    System.Reflection.BindingFlags.NonPublic |
    System.Reflection.BindingFlags.GetField |
    System.Reflection.BindingFlags.IgnoreCase
    |System.Reflection.BindingFlags.Instance;
    System.Reflection.FieldInfo fInfo =
    dc.GetType().GetField("autoIncrementCurrent",bf); fInfo.SetValue(dc,value);
    }
    catch (Exception)
    {
    //when the field is gone, perhaps MS fixed the autoincrement bug
    }
    }
     
    Gene Gorokhovsky, Jul 17, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Munnki
    Replies:
    2
    Views:
    538
    Munnki
    Dec 18, 2003
  2. RA
    Replies:
    0
    Views:
    363
  3. RA
    Replies:
    1
    Views:
    445
    Darrin J Olson
    Oct 22, 2003
  4. fatboycanteen

    About Rowstate and AutoIncrement

    fatboycanteen, Dec 12, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    335
    fatboycanteen
    Dec 12, 2003
  5. Sky
    Replies:
    2
    Views:
    462
Loading...

Share This Page