Advertisement

04.09.2008 at 11:08AM PDT, ID: 23309126
[x]
Attachment Details

Add,Edit and Delete Data in Datagridview and Saving Changes Back to the Database

Asked by beckboy_28 in Microsoft Visual Basic.Net

Tags: VB 2005, SQL Server 2005 Express Edition

Hi,
I have two forms:
Form1 will contain datagridview to show all the students info (ie.student_id,first_name,last_name,contact_no)
Form2 will contain the corresponding student_id,first_name,last_name,contact_no(all TextBox)
I am using VB.Net 2005 Professional Edition and SQL Server 2005 Express Edition.

I have done the first form which displays the students info table in the datagridview.

When  the user double-clicks on a row in a datagridview it show the full record(row) in the second form.

Firstly, I need to know how to save the changes made to the record in Form 2 back to the database. This will be done by pressing on the Save button.

Secondly, on the same form, there will be a Delete button which will delete the entire student record.

Finally, in Form 1, there will be an Add button which will prompt a new form which you can fill in a new student's info and save it back into the database.

A sample code would be highly appreciated.

Regards,Start Free Trial
[+][-]04.09.2008 at 02:44PM PDT, ID: 21319385

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.09.2008 at 11:07PM PDT, ID: 21322078

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.09.2008 at 11:38PM PDT, ID: 21322210

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.10.2008 at 12:11AM PDT, ID: 21322356

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.10.2008 at 12:23AM PDT, ID: 21322417

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.10.2008 at 12:55AM PDT, ID: 21322563

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.10.2008 at 02:19AM PDT, ID: 21322935

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.10.2008 at 04:13AM PDT, ID: 21323458

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.10.2008 at 04:25AM PDT, ID: 21323519

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.10.2008 at 09:39PM PDT, ID: 21331405

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.10.2008 at 11:17PM PDT, ID: 21331663

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Visual Basic.Net
Tags: VB 2005, SQL Server 2005 Express Edition
Sign Up Now!
Solution Provided By: jpaulino
Participating Experts: 1
Solution Grade: A
 
 
[+][-]04.10.2008 at 11:18PM PDT, ID: 21331667

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.11.2008 at 12:42AM PDT, ID: 21331990

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628