Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


access db and drag and drop to form..


access db and drag and drop to form..

Author
Message
Malakie
Malakie
Forum God
Forum God (317 reputation)Forum God (317 reputation)Forum God (317 reputation)Forum God (317 reputation)Forum God (317 reputation)Forum God (317 reputation)Forum God (317 reputation)Forum God (317 reputation)Forum God (317 reputation)

Group: Forum Members
Posts: 1, Visits: 1
I am teaching myself .Net and have both MSDN 2010 and 2012 versions of Visual Studio installed. I have been a VB programmer for years but using the VB6 platform primarily.



I have been utilizing a lot of tools and books and demos to try and get an understanding but it seems I cannot even figure out the simple things right now.. One example I just went through was how to create a basic form and add controls connected to an Access DB by dragging and dropping the fields directly from the Data Source window.



I create the form. Created and tested the DB connection to the access database. Selected the table in the Data Source window and dragged the table to the form and dropped it. A Binding Navigator was created, all the controls were created and no errors appeared.



I then ran the app. Everything loaded with no errors. I entered some extraneous data in the fields and then hit the save/update icon. Clicked the add record icon and did the same for a second record. I then exited the app and then reloaded it to insure the data had truly been saved... except it was not.



Nothing I typed in was saved nor did it even show one record saved in the database at all. I then looked at the code generated during the drag and drop. This is what was generated under the save icon in the toolbar:





Private Sub Tbl_GamesOwnedDBBindingNavigatorSaveItem_Click(sender As Object, e As EventArgs) Handles Tbl_GamesOwnedDBBindingNavigatorSaveItem.Click

Me.Validate()

Me.Tbl_GamesOwnedDBBindingSource.EndEdit()

Me.TableAdapterManager.UpdateAll(Me.GamersToolkit2012DataSet)



End Sub



Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

'TODO: This line of code loads data into the 'GamersToolkit2012DataSet.tbl_GamesOwnedDB' table. You can move, or remove it, as needed.

Me.Tbl_GamesOwnedDBTableAdapter.Fill(Me.GamersToolkit2012DataSet.tbl_GamesOwnedDB)



End Sub



So why is this not working?? I am not writing the code rather following along on some tutorial that does not seem to work... Can anyone explain a bit more about this because I am totally lost now..

GO



Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search