|
-
Oct 15th, 2004, 02:16 PM
#1
Thread Starter
Frenzied Member
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?
-
Oct 15th, 2004, 04:20 PM
#2
Fanatic Member
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.
-
Oct 15th, 2004, 08:38 PM
#3
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:
dim cb as new sqlcommandbuilder(daCategories)
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|