Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Add, Edit, Delete, Cancel Records
Message
From
19/11/2002 12:02:06
 
 
To
All
General information
Forum:
ASP.NET
Category:
Forms
Title:
How to Add, Edit, Delete, Cancel Records
Miscellaneous
Thread ID:
00724368
Message ID:
00724368
Views:
40
Hi,

I created a simple project using windowform and vb.net.

Standard Wizards.

SqlConnection, SqlDataAdapter1 (Employees), SqlDataAdapter2 (JobType), SqlDataAdapter3 (JobTitle) and a DataSet with all 3 tables included in the generate dataset wizards.

Added SearchLastName(Textbox), SearchButton, DataGrid1 to display the results of the search and textboxes, Comboboxes and 5 buttons to the Form for the edits etc. for the detail fields.

The idea here is to:

(1) Type in the lastname and click search, Position the grid to the desired record and click the EDIT BUTTON to edit the textboxes/comboboxes (fields) and then CLICK BUTTON to update (save) changes to the record and to the datasource; Optionaly you can click the CANCEL BUTTON and that would undo the changes that you made to the textboxes etc.

(2) Position the grid to the desired record and click the DELETE BUTTON the selected record.

(3) Click the ADD BUTTON to add a new Record and SAVE BUTTON would add it to the datasource. Also the CANCEL BUTTON would allow to cancel the add record.

What is the proper coding for SQL DataApater and Datasets when a button is clicked to:

ADD a Record to the dataset for Employees table:

EDIT/CHANGE selected record in the dataset for Employees table:

SAVE Edits/Changes selected Record to the dataset for Employees table:

DELETE selected record in the dataset from the Employees table:

CANCEL Edits or Add to the dataset for the Employees table:


Thanks
Roland
Next
Reply
Map
View

Click here to load this message in the networking platform