hi, can u help me

my Datagrid which connected to ADODC1 was updating evrytime i click my ADD command button, then i made another command button to CLEAR what data is in the grid, i used this codes to do that but always error like this "KEY COLUMN INFO IS INSUFFIECIENT OR INCORRECT. TOO MANY ROWS WERE AFFECTED BY UPDATE"

While Not Adodc1.Recordset.EOF

i want when i click clear button, all the data in grid will erase and also in the database.

help me please :)

Recommended Answers

All 2 Replies

In your grid its quite simple...


Getting to your deleting of all records, are you sure that is what you want to do. Why set up a table, add data to it just to delete it all again? Why not just delete the records you don't want anymore....

I hope this will help you
Set Datagrid1.DataSource = Nothing
It will clear the Datagrid .

Shahid From Pakistan

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.