Simple insert to dataset

Simple insert to dataset

Postby stroyer74 » Mon 24 Sep 2007 22:48

I'm attempting to do an insert to my dataset and am struggling. I'm still a bit new to a lot of this, so it is probably a simple error.

I already have a dataset configured using the data source configuration wizard (dataset name is "dsHR" and table is "employee"). I have my form fields bound to this dataset and it works without a problem (retrieving, updating).

I would like to insert new records using the same dataset, but am unsure of what my code should be to make this happen. Here is my code for the "NEW" button. It is currently only trying to insert a new record and save the ClockID. I receive no error when running this, but it doesn't update the database or the dataset.

Using VB.NET 2005.

Any suggestions? Thanks in advance, Sheldon

Private Sub btnNew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNew.Click
Dim row = DsHR.employee.NewRow
row("clockid") = txtEmployeeID.Text

End Sub
Posts: 2
Joined: Mon 24 Sep 2007 22:37

Postby Alexey » Tue 25 Sep 2007 06:50

Please send your project to the address provided in the Readme.txt file.
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Return to dotConnect for PostgreSQL