Please help me on ADO.net (vs express)

Hi,

1> I think I missed something basic here but not sure what it is. I have this simple datagridview displaying a record of a table (in SQl Server) in my VB form. I run the appz, change the data in some column in the gridview, click save button in the bindingNavigator then exit out. When I run the appz again, that data in the dataset is updated which is great. Next, I open SQL Server and do a "select" on that table. I got the same old data. I did have this code in the form:

PrivateSub ContactBindingNavigatorSaveItem_Click(ByVal senderAs System.Object,ByVal eAs System.EventArgs)Handles ContactBindingNavigatorSaveItem.Click

Me.Validate()
Me.ContactBindingSource.EndEdit()
Me.ContactTableAdapter.Update(Me.AdventureWorks_DataDataSet.Contact)

EndSub

I also have the "Copy to output directory " properties of the .mdf and .xsd set to "copy if newer"

Why the data is it updated in the dataset but not updated in the relying db in SQL server? what went wrong?

2- If I added a 2nd datagridview and a 2nd bindingNavigator for another table in the same form. The "save" button in the second bindingNavigator is missing. What is going on?

Thanks for your help.

roisaonua ;[

[1954 byte] By [roisaonua] at [2007-12-25]
# 1

The database file which is being updated is the one in the bin folder. Depending upon the stting of the copy to output folder will determine when the bin folder copy is updated.

I would suspect that the application is modifying the bin folder copy of the database but you are looking at the original copy of the database file - which wouldnt reflect the chnages made by your application.

spotty at 2007-8-31 > top of Msdn Tech,Visual Studio Express Editions,Visual Basic 2005 Express Edition...