Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / February 2006

Tip: Looking for answers? Try searching our database.

Trouble with BindingSource

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joel H - 25 Feb 2006 22:06 GMT
I've gone through a few demos and walkthroughs trying to become familiar with
the new binding in vs2005.  I'm having some success, but not every time.

I've create a dataset with the datasource configuration wizard.  I have 3
tables in this dataset (expense, category, and type).  I drag each table onto
a separate form.  Visual studio creates a datagridview and binding navigator
on each form.  When executed, the grids on each form populate correctly.  The
problem is that one of the tables doesn't get updated when I press save, the
other two save correctly.  I'm not writing any code, just using the
autogenerated code that VS writes:

   Private Sub ExpenseBindingNavigatorSaveItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ExpenseBindingNavigatorSaveItem.Click
       Me.Validate()
       Me.ExpenseBindingSource.EndEdit()
       Me.ExpenseTableAdapter.Update(Me.ExpenseDataSet.expense)
   End Sub

I can't figure out what is different about the expense table/grid that is
causing it to not update.  There are no errors generated.  If I inspect the
dataset in the debugger after I make changes in the grid, the dataset appears
to get updated.  I therefore believe it has something to do with the
BindingSource or TableAdapter.  The changes never make it from the dataset to
the database (an access db).

Joel
Jim Hughes - 26 Feb 2006 00:24 GMT
LIkely cause would be a lack of a primary key on the Expense table.

> I've gone through a few demos and walkthroughs trying to become familiar
> with
[quoted text clipped - 31 lines]
>
> Joel

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.