PC Review


Reply
Thread Tools Rate Thread

Bound Data Update

 
 
jack
Guest
Posts: n/a
 
      9th Jul 2004
I have a form that has textboxes bound to a dataset which
I am trying to update.

What the form has is:
DsCampaign1- Dataset
OleDbDataAdapter1- dataadapter
OleDBConn - db connection

The OleDbDataAdapter1 is bound to a table that has one row.

On form load the textboxes get the data from the row of
the db via this code:
DsCampaign1.Clear()
OleDbDataAdapter1.Fill(DsCampaign1)

The issue is getting the data to update in the database.
The form close has the following code (to write the data
back to the db)
Dim intRowSwapper As Integer = Me.BindingContext _
DsCampaign1, "RBIGoals").Position - 1
Me.BindingContext(DsCampaign1, "RBIGoals").Position _
+= intRowSwapper
OleDbDataAdapter1.Update(DsCampaign1)

If I look at the dataset in the immed window via:
?DsCampaign1.Tables("RBIGoals").Rows.Item(0).Item
("NetIncome")
the updated data is there, however it never reaches the
table.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to update my data bound control? =?Utf-8?B?YmlsbHI=?= Microsoft Dot NET Framework Forms 4 4th Nov 2007 06:34 PM
Re: PropertyManager.EndCurrentEdit() marks the bound dataview row as Modified even if the data in the bound control is unchanged Miha Markic [MVP C#] Microsoft ADO .NET 0 5th Jun 2004 11:19 PM
How to update DataSet without moving in data-bound form??? al Microsoft ADO .NET 1 8th Dec 2003 09:59 PM
Update Command / Data bound controls Problem Rob Williams Microsoft ADO .NET 1 2nd Sep 2003 07:20 PM
Notify Data Bound ListBox of Update Noah Coad [MVP .NET/C#] Microsoft C# .NET 0 31st Jul 2003 07:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:41 AM.