Hi All,
does anyone know what code i would need to:
1: create a new row within an access database, or a dataset.
2: populate that row with data from a text box.
3: Do sql queries on database directly .
thanks!!
Printable View
Hi All,
does anyone know what code i would need to:
1: create a new row within an access database, or a dataset.
2: populate that row with data from a text box.
3: Do sql queries on database directly .
thanks!!
You dont need to use SQL to create a new row or add it to the DB. After connection and everything is set up in the database. Create a dataTable from the table in your dataset where
you want to add the new row. Then create a new datarow on the datatable. After that you need to add information to the new datarow, then update the dataset.
It is really simple, I'm not at a VS.NET workstation, but I will provide some sample code when I get home later.
Look up dataRow and dataTable.
Thanks that code would be great!
Code:Me.BindingContext(Dataset_Name, "Table_Name").EndCurrentEdit()
Me.BindingContext(Dataset_Name, "Table_Name").AddNew()