Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

database field deletion!

Status
Not open for further replies.

tuam1234

Technical User
Feb 6, 2004
52
IE
does anybody have any code that will physically remove a record from a database.

i do have code that deletes/locks access to the record but i want to be able to completly remove the code from the database as it is populating a dropdown box and i want the box to be accurate..

thanks for all suggestions!!
 
Deleting (using SQL DELETE keyword) the record should be enough to delete it from the database. Or you could instead use a more exact statement when pulling data back for your dropdown. If the records are getting marked as locked when you use a built-in delete, then it is likely they are being saved for some purpose (perhaps to keep data integrity for older records). In that case you would populate your drop down from something like "SELECT * FROM MyTable WHERE locked = false". Obviously "locked" would be replaced by whatever fieldname you are using, but this would allo you to noit pull back the locked records without deleting them and possibly harming older data.

-T

01000111 01101111 01110100 00100000 01000011 01101111 01100110 01100110 01100101 01100101 00111111
The never-completed website:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top