TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
felix connely
NA
7
0
FORM APP (C#) > DELETE PROBLEM SQL-!DATABASE
May 8 2015 6:45 PM
Please check to the code block!
I would delete selected rows on gridview. But
i also would like to delete this selected rows which i choice on gridview IS also delete from database. but it doesnt work! HELP ME ! WHERE I MAKE MISTAKE !
private void button3_Delete(object sender, EventArgs e)
{
con.Open();
SqlCommand komut = new SqlCommand("delete from ME where pid = pid", con);
int row = Convert.ToInt32(dataGridView1.Rows[0].Selected);
if (row != 0)
{
dataGridView1.Rows.RemoveAt(row);
}
komut.ExecuteNonQuery();
con.Close();
}
Reply
Answers (
2
)
Stored Procedure
Storing web content c# .NET