September 10th, 2002, 04:59 AM
Help needed: editing and deleting from a database
I am working on an application that displays the content of a database as a web page. This content is pulled from the database by servlets and it is inserted into the database via an admin form.
The problem I have is, I need to be able to edit entries and delete entries. I don't really know java and the application was created by someone else, I have just been given the job of adding the edit and delete features.
I would appreciate it if someone could give me the code for editing an MS SQL database and deleting from it.
Thanks in advance,
PS: I have a very tight deadline for this so help is very much appreciated.
September 19th, 2002, 05:54 PM
First of all you have to create the query's you want to use for deleting and editing stuff.
I don't what you know about SQL but what you're asking is the most basic there is.
For editing you use the UPDATE code, it looks like this:
UPDATE users SET firstname.lastname@example.org' WHERE user_id = 1;
For deleting you use the DELETE code, like this:
DELETE FROM users WHERE user_id = 15;
This will point you to the right way.