Hello everyone this will be my first post.
I am happy that there is a forum like this with very supportive people.:)
So on topic..
I am a student creating an Inventory System software for my school using VB on VS 2008.
I am having trouble saving items from a DataGridView to Access 2007.
The codes I browsed here are quite different from what instructors teach us at our school.
These are some of the codes we are using to save items from textboxes to Access 2007 database with a table named studenttable and database named student for your added information.
Dim StudentAdapter as New OledbDataAdapter Dim StudentBuilder as New OleDBCommandBuilder Dim StudentDS as New DataSet Dim con as New OleDbConnection con.ConnectionString = "Provider = Microsoft.Ace.Oledb.12.0; Data Source = student.accdb" con.Open() StudentAdapter = New OleDbDataAdapter("Select * from studenttable", con) StudentBuilder = New OleDbCommandBuilder(StudentAdapter) StudentAdapter .Fill(StudentDS , "StudentInfo") Dim newrow As DataRow = StudentDS.Tables("StudentInfo").NewRow() newrow("StudentID") = textbox1.Text newrow("Name") = textbox2.Text StudentDS .Tables("StudentInfo").Rows.Add(newrow) StudentAdapter .Update(StudentDS , "StudentInfo")
See? Totally different from what i am seeing here.. >_<.
Hoping for replies. Thank you. :)