Click here to Skip to main content
15,901,001 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello
i am making some application using vb.net 2010 and sql server 2005, i have 12 columns in my table "Beini" and have datagridview1. usign the following code i can populate all data stored in sql database to datagridview1.
VB
Dim cmd As SqlCommand = New SqlCommand("Select * FROM Beini", conn)
        conn.Open()
        Dim myDA As SqlDataAdapter = New SqlDataAdapter(cmd)
        Dim myDataSet As DataSet = New DataSet()
        myDA.Fill(myDataSet, "Beini")
        DataGridView1.DataSource = myDataSet.Tables("Beini").DesignMode
        conn.close


my problem is i didn't know how to Add, Delete And Update Database from Datagridview1

thank you
i hope you will help me
Posted
Updated 4-Aug-13 23:18pm
v4
Comments
Joezer BH 5-Aug-13 5:18am    
I've posted a link to a project that does all this, but in the future try to be more explicit on your problem, explain what you need in specific details.
If you have many questions, consider posting a questions post for each one.
Cheers,
Edo
v4n.h4len 19-Sep-15 0:06am    
you can try this tutorial

http://www.yuzplay.ga/delete-sql-data-from-datagridview/

hope this help

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900