Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hie!

Anyone tell me how to delete record logically from ms access databse in vb.net 2005 ?
Posted

Add a column to your table like Active, type bit, then use a query like this

this will return all the active rows.

SELECT * FROM TBL_YOUR_TABLE WHERE ACTIVE = 1

to delete the row, use a similar statement to this

UPDATE TBL_YOUR_TABLE SET ACTIVE = 0 WHERE YOUR_UNIQUE_ID = UNIQUEID
 
Share this answer
 
It's really annoying when people ask a question and are given an answer, but because they're not smart enough to understand it, they just wait a day and ask it again. The answer has not changed. You want to add a column to mark what fields are deleted and make sure your SQL always uses that field to filter out deleted records.
 
Share this answer
 
You can go through this [^] article - it does not talk about any database in particular but can give you ideas on implementing this type of delete.
 
Share this answer
 
v2
Sorry, i cant get your answer. Do you mean to Hide a record, that you do not want to display or call ?
 
Share this answer
 
Comments
Npanchasara 6-Jul-10 1:07am    
Yes.. when i make it delete logically means falseafter that it will not displayed or call .

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