Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

asp database editing 1

Status
Not open for further replies.

craigey

Technical User
Apr 18, 2002
510
GB
I'm trying to write an asp page that will allow me to edit/delete/add records in my access database. But am having very little luck with it. Can anyone help?

I want a page to display all page_id and page_ref entries in the database. With an delete/update option to one side. When the update link is clicked then you fill in a textbox press a submit button and the database gets updated. When you click on the delete link a pop-up message box saying are you sure appears ok deletes the entry, cancel just takes you back to the editing page.

At the bottom of the page I would like the opton to add a new record to both fields.


Can anyone please help me out. I'm only just starting to learn ASP, but this project is quite important to me. Thanks.
 
Send me a db description (table name, field names, field types) and I'll write you a working example, I'd rather not write it here though because my on the fly code tends to confuse people :)
-Tarwn
Tarwn@ec.rr.com
 
I'd be glad to help as well. My on-the-fly code tends to confuse me :)

So, Tarwn, let's see your on-the-fly code just for a little challenge.
 
I've sent off an e-mail to Tarwin with the following info:



Column 1 is called urlPK and uses autonumber
Column 2 is called url and is a text field
Column 3 is called websitename and is also a text field.

The Table name is called urllist and the database name is mydatabase.mdb It's an Access 97 database. I may update this to be an access 2000 database.

Thanks in advance
 
Sorry, didn't see these posts last night or I would have put the sorting in. Also, those buttons I gave you for update, delete, add don't have to be buttons, any object with an onClick will work for it.
As for on-the-fly code wombat, I wrote the entire example to craig in under 3 hours (wrote a little, went for dinner and a movie with my girlfriend, came back and wrote a little more) so it wasn't quite on the fly code, due to that whole testing thing, course since I was half-asleep at the time, testing wasn't much more than, hmm did it work once? cool, sleepy time. :p

Note: I'll post all three copies of the code here for everyone.

As a teaser :)
three files:
urllist.asp - Very commented version of the code
uncommentedurllist - Very uncommented version of the code
prettierurllist.asp - Somewhat colorized version of pages

I would post addresses to my web server, but it ran into a little accident last night and has been DOA the last 4 reboots, as soon as I get off tonight and fix it I will post links to the pages.
-Tarwn
 
If anyone else reads this post. I will be posting the 3 ASP pages mentioned above by Tarwn as soon as I've finished playing with them.

Also please please please mark Tarwn post as helpfull, even if you are just passing. As this guy has spent quite a bit of time & effort helping me out. I don't think there are many posts that are as good in quality as this one is/will be.


Cheers
 
The tutorial/FAQ is posted with a link to the zip including all 3 ASP files and the sample db. (Access 2000)
The majority of the code was written last night between 10pm and midnight, so I can' claim to have spent quite as much time and effort as it sounds like, but the files are complete. There were some minor modifications made this evening before I sent them in, but they are commented.

As for wombats comment about my on-the-fly code, define on-the-fly [upsidedown]

There is a little introduction to the files at the FAQ, but the majority of the explanation is in the first copy (urllist.asp) which has been pasted in the page, have fun
-Tarwn

FAQ: Located under ASP 102 in the ASP FAQs, it's the only one :) Can't miss it.

Links:
original - extra stuff - zip:
 
I cannot download urllist.zip from you. Is it still there? Could you send it E-mail it me? Mat3383@hotmail.com

Thanks
 
I apologize to anyone else that has tried to download this, i'm setting up a site later this month and I'll post that up as one of the resources in my mini-resource library at the site.

Unfortunatly I've been on the VPN for a few weeks now on and off and it gets snotty about allowing people to connect to my web servers when it's on.

-Tarwn --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top