how to delete the last record i inputted in my table using sql? im using adodb and i dont know how to delete the last record i was inputted please help me

Hi.

When u insert a record, did u give any primary key constrain ?

nope

in adding i used only

rs.open "insert into etc"

thats all

and i have cancel button in my cancel button i want to delete the last record i save :)

Instead of using INSERT query, you can use

'In form Load
RS.Open ("SELECT * FROM TABLE")

'To Add, Use
RS.AddNew

'To update
Rs.Fields(sFieldName) = Value
..
Rs.Update

'To Cancel
Rs.CancelUpdate

Use primary key to identify the record uniquely. I hope this may be helpful to you

i want to put the cancel update in my cancel button how can i work w/ that?

Be a part of the DaniWeb community

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