Last post Jan 27, 2014 12:16 PM by ibradleyallen
Jan 27, 2014 12:09 AM|ibradleyallen|LINK
i have a gridview connected to the sql database, and its over 1000 entries and very slow to refresh. i want to delete whats in there. i added this to a button click, which instantly clears out the contents of the gridview. gone. go to write again? and
all of it still there, starts where it left off.
expected it to start adding at index 1. what else is needed?
protected void Button2_Click(object sender, EventArgs e)
SqlDataSource1.DeleteCommand = "delete from [main5]";
Jan 27, 2014 05:14 AM|srameshdurai|LINK
Afrer delete statement execute, try execute the below statement. then you will get expected result.
DBCC CHECKIDENT('main5', RESEED, 0)
Jan 27, 2014 12:16 PM|ibradleyallen|LINK
yes that fixed it!! no idea how you did this... i added the string to the delete statement and then did delete() again, and it cleared it out, starting at 1 again thanks so much!!