...

View Full Version : add, edit, and delete



phillip_ewing
01-13-2003, 08:35 PM
How do add, edit, delete a database via asp or database? A code example by chance.

whammy
01-13-2003, 11:42 PM
What you need is SQL (Structured Query Language). You might want to check out this tutorial:

http://hotwired.lycos.com/webmonkey/02/35/index4a.html?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. :eek:

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

:)

phillip_ewing
01-14-2003, 01:50 PM
Thank you for you assistance. I will try that.

The Wizzard
01-14-2003, 02:55 PM
This is perfect for you...

http://www.webwizguide.com/asp/tutorials/add_to_database.asp

http://www.webwizguide.com/asp/tutorials/deleting_data_from_database.asp

http://www.webwizguide.com/asp/tutorials/updating_data_from_database.asp



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum