Home > ASP Development > Add/Edit/Delete Record?

Add/Edit/Delete Record?



Hi all,



I am new to asp, and i have found various example scripts to add/edit from database, but how can i show all the db records by id on a page, then have a form with a box to choose which record to edit/delete by id, and then when chosen, it shows the info for the record in a form, which then can be just edited and updated?



I want it to be just like as if you had just typed the details into the form itself before you registered....if you can understand what i'm going on about!! lol



Thanks in advance,

Steve

    
Guest


steve, it's a fairly common request and the solution is fairly straightforward, but you'll find it on the ASP forum, not this one. I've moved your thread there.

Was this answer helpful ? Yes No   
Guest


I understand you want to show all the records. Where and how? A table is fine?...



That's not problem. I'll show you after I understand all your requirements.



Do you wish to also be able to edit more then one record at a time?...



write me back and I hope I could offer help ... Always my pleasure

Was this answer helpful ? Yes No   
Guest


Yes, A table is fine thanks.
Just edit one record at a time i think, as it will be for a members database.
I wish to select the appropiate record by the id, and then make the information in that record go into a form or something, so that it can be deleted/changed edited, and then a submit button will update the stored info in db to the new edited info.

Many Thanks,
Steve

Was this answer helpful ? Yes No   
Guest


I will also need seperate pages to add a record and delete a record accordingly, but i think i will be able to work that out myself by looking through the update code and learning it.

Thanks again,
Steve

Was this answer helpful ? Yes No   
Guest


yes, learning urself is the best thing Stevis.
try learning from sites like www.w3schools.com

write codes and if u face any difficulty post ur code here......... someone will help ya.
best of luck

Was this answer helpful ? Yes No   
Guest


ya thats right.all that can be found at www.w3schools.com.or an alternative is searching through this forums in the search forum.there are lots of insert,update,delete examples lying around.write something and if faced with problems,people here are glad to help

Was this answer helpful ? Yes No   
Guest


I agree, take a look around, slowly build your script. Start with displaying the records from a database and work your way up. I create a system exactly as you are saying not too long ago. It feels good to write your own script and is a great learning experience for asp.



I will be more than happy to help you if you get stuck.

Was this answer helpful ? Yes No   
Guest


http://www.asp101.com/samples/



http://www.asp101.com/samples/db_edit.asp





Webkido

Was this answer helpful ? Yes No   
Guest


Thank You very much for that, but any idea why i get this error.....



ADODB.Recordset error '800a0bb9'



Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.



/admin/edit.asp, line 190



Line 190 is the following...



Set rstDBEdit = Server.CreateObject("ADODB.Recordset")

rstDBEdit.Open strSQL, CONN_STRING, adOpenForwardOnly, adLockReadOnly, adCmdText

%>



Thanks again,



Steve



I have updated the table to reflect mine and have also changed the db connection routine, but that's fine as far as i am aware.



Steve

Was this answer helpful ? Yes No   
Guest
 
 
Home - About Infoqu - Contact - Privacy Statement - Link to Infoqu - Bookmark Infoqu

Copyright 2007-2008 by Infoqu. All rights reserved