Results 1 to 3 of 3

Thread: dataAdapter update problem

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489

    dataAdapter update problem

    i have a few textboxes that i bind to a dataset and when i try to change the values after filling it and displaying it, i update the dataset but the database isn't modified.

    the dataadapter_row updating or updated events arent fired either

    here is my code.

    Me.daCategories.Update(Me.DsCategories1.Categories)

    any suggestions?

    does it have something to do with the fact i'm using text boxes?

  2. #2
    Fanatic Member
    Join Date
    May 2002
    Posts
    746
    It's in C# but it should point you in the right direction.
    Code:
    this.BindingContext[Helper.IsecData.Agency].EndCurrentEdit();
    CurrencyManager cm=(CurrencyManager)this.BindingContext[Helper.IsecData.Agency];
    int cmPos=cm.Position;	
    Helper.IsecData.Agency.Rows[cmPos][Helper.IsecData.Agency.LastUpdatedColumn.ToString()]=DateTime.Today;
    DataAccess.UpdateAgencyTable(Helper.IsecData.Agency);
    Helper.IsecData.Agency.AcceptChanges();
    *IsecData is a typed dataset in the static Helper class.

  3. #3
    Frenzied Member mar_zim's Avatar
    Join Date
    Feb 2004
    Location
    Toledo Cebu City.
    Posts
    1,416

    Re: dataAdapter update problem

    Originally posted by Andy
    i have a few textboxes that i bind to a dataset and when i try to change the values after filling it and displaying it, i update the dataset but the database isn't modified.

    the dataadapter_row updating or updated events arent fired either

    here is my code.

    Me.daCategories.Update(Me.DsCategories1.Categories)

    any suggestions?

    does it have something to do with the fact i'm using text boxes?
    i think you put some commandbuilder to your dataadapter...
    VB Code:
    1. dim cb as new sqlcommandbuilder(daCategories)
    2. Me.daCategories.Update(Me.DsCategories1.Categories)

    i dont if that the efficient one.

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