Click here to Skip to main content
15,902,938 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
private void button1_Click(object sender, EventArgs e)
        {
            this.tableTableAdapter.Insert("some text in 1st collumn", "2", "3", "4", "5");
            this.tableTableAdapter.Update(this.webDataSet.table);
            
        }


I'm using DataGridView. Need to add records manually(not by editing in DataGridView) and update table.
Please, help.
Posted
Updated 27-Sep-10 11:58am
v4

1 solution

See, whenever you are inserting something into database, you need an insert statement.

If you are invoking an insert statement from inside tableTableAdapter then it is fine, otherwise you need SqlCommand object to create your command. :)
 
Share this answer
 

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