#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2002
    Posts
    0
    Rep Power
    0

    Help needed: editing and deleting from a database


    Hi,

    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,
    martin

    PS: I have a very tight deadline for this so help is very much appreciated.
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2002
    Location
    The Netherlands
    Posts
    6
    Rep Power
    0

    Red face


    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 email='user@test.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.

    Success.

IMN logo majestic logo threadwatch logo seochat tools logo