Fordraiders
asked on
Binding Navigator Not Working
vb.net 2008
sql server express 2005 sp3
Did I miss something.
I just created a Data Source to my sql server express table
Created a form.
Dragged my datasource node code to the form.
The dataset and binding navigator toolbar was created.
But the records are not deleting or adding to the sql server database ?
The only code I see behind the buttons is the save button. code ???
Did I miss a step somewhere...
I thought the code to saving a record , saving, was added automatically during design mode.
Thannks
fordraiders
sql server express 2005 sp3
Did I miss something.
I just created a Data Source to my sql server express table
Created a form.
Dragged my datasource node code to the form.
The dataset and binding navigator toolbar was created.
But the records are not deleting or adding to the sql server database ?
The only code I see behind the buttons is the save button. code ???
Did I miss a step somewhere...
I thought the code to saving a record , saving, was added automatically during design mode.
Thannks
fordraiders
To save, add and update data from local datasource to database need to code. The controls only update/add/delete data from local source (dataset, datatable).
ASKER
Patel,
OK.Where are examples of this to finish it out..from locasource to database ?
Thanks
fordraiders
OK.Where are examples of this to finish it out..from locasource to database ?
Thanks
fordraiders
Add a messagebox and load which shows the Update and Delete commands of the adapter.
msgbox(tableadaptername.Up dateComman d.CommandT ext)
Do you have a primary key in the Select statement or the column list?
msgbox(tableadaptername.Up
Do you have a primary key in the Select statement or the column list?
ASKER
CodeCruiser, Thanks for replying.
I have a primary key..., I guess I was assuming it worked the same as MsAccess... It writes directly to the data table and saves....it sounds as if this is is what it is doing in sql server express.?
I added this ?:
' for adding a new record..
Private Sub BindingNavigatorAddNewItem _Click(ByV al sender As System.Object, ByVal e As System.EventArgs)
TblMainDataBindingSource.A ddNew()
End Sub
So would I use the bindingsource.. to do all the saving into sql express table.. ?
Thanks
fordraiders
I have a primary key..., I guess I was assuming it worked the same as MsAccess... It writes directly to the data table and saves....it sounds as if this is is what it is doing in sql server express.?
I added this ?:
' for adding a new record..
Private Sub BindingNavigatorAddNewItem
TblMainDataBindingSource.A
End Sub
So would I use the bindingsource.. to do all the saving into sql express table.. ?
Thanks
fordraiders
I think you would use tableadaptor.updateall() function.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That was it Thanks !
Probably following code will be there on you Code Behind file
Open in new window
If yes, you are not missing anything, but do you press Save button after Deleting Record?
If you don't click on Save after Deleting record, it will not delete record.
- Deepak Lakkad