|
-
Apr 11th, 2010, 07:51 AM
#1
Thread Starter
New Member
[RESOLVED] info not saving in a database
I created a database in access 2007, linked it to my project in visual studio 2008 (vb). When I enter some data using the UI, it does not save it in the database, and it's gone as soon as I run the program again. I dragged the textboxes from the datasource panel, onto the UI.... any ideas?
this is the code that was automatically generated by vs for the save button:
Code:
Private Sub StaffBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StaffBindingNavigatorSaveItem.Click
Me.Validate()
Me.StaffBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.GartisDataSet)
End Sub
-
Apr 11th, 2010, 08:40 AM
#2
Junior Member
Re: info not saving in a database
ok what you have to do first is to create your data set
go to data create new data set(im assuming you did this)
select your database name change your data set name select the table you want to work with, finish
first of all you need to erase all the controls that you may have when you dragged your datasource before erase the data set, the binding source, table adapter, table adapter manager, and binding navigator.
now go to data show data sources press + in the data set you created
now you showld see the table you created press the drop down box and select details
now drag and drop to your table it shold create a navigation panel and the text boxes with the info in your DB you can manage the info using the nav panel you can add delete save the data from there
-
Apr 11th, 2010, 12:42 PM
#3
Thread Starter
New Member
Re: info not saving in a database
got it.... it was working fine, when launching the app via vs, it copies a db file every time, so the data is removed, after launching it from debug/release folder, it works fine
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
|