Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jan 2003
    Location
    Georgia
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy add, edit, and delete

    How do add, edit, delete a database via asp or database? A code example by chance.

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    41° 8' 52" N -95° 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What you need is SQL (Structured Query Language). You might want to check out this tutorial:

    http://hotwired.lycos.com/webmonkey/...tml?tw=backend

    That will give you the syntax you need for that, as well as a basic understanding of relational databases (sounds hard, but it's very easy).

    Also, you might want to check out the basic login/registration script I wrote here:

    http://www.solidscripts.com/downloads/register.zip

    As it has some code in the comments directly related to your question, and also uses the tool from the tutorial above as an example, i.e.

    create table mytable(id autonumber, firstname text, lastname text)

    update mytable set firstname = 'John', lastname = 'Smith' where id = 1

    delete from mytable where id = 1

    ' new record
    insert into mytable (firstname,lastname) values ('John','Smith')

    Don't ever forget the "where blah = blah" (generally called the "where clause") on update and delete statements, since if not specified they will update ALL the records without prejudice.

    I'm sure you can find plenty of SQL tutorials as well by a google search.

    Last edited by whammy; 01-14-2003 at 12:47 AM.
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #3
    New Coder
    Join Date
    Jan 2003
    Location
    Georgia
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cool Thank you

    Thank you for you assistance. I will try that.

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    Lake Forest, CA
    Posts
    259
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The Wizzard
    OC Motor Cars | OC Auto Sports (Coming Soon!)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •