validate database

This is a discussion on "validate database" within the Classic ASP section. This forum, and the thread "validate database are both part of the Program Your Website category.



 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Closed Thread
 
LinkBack Thread Tools
  #1  
Old Sep 6th, 2004, 04:31
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,611
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
validate database

i have declared 3 primary key in my database,
i have a form, that will ask the user to input this three data,
i have used <on error resume next> function in my page. if there is a duplication or an error in the submitted page, it will open an error page which i had created.

the problem is, i have set that in the form, when the user click the submit button, the page will redirect to the display page, even if the page contain an error(duplication in database)
that means that the on error resume next is not working..

anybody can help me please?
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!

  #2  
Old Sep 6th, 2004, 09:51
Rob's Avatar
Rob Rob is offline
Webforumz Founder
Join Date: Jul 2003
Location: Southern UK
Age: 34
Posts: 3,160
Blog Entries: 7
Thanks: 27
Thanked 19 Times in 16 Posts
Hi Monie....

The USUAL way to deal with this sort of thing is to have the form post to the same ASP page.

If you give a name and a value to your submit button, then you can check if request.form("buttonname") has a value.... if it has the form was submitted... if not, then the form needs to be displayed. Does that make sense? here is some pseudo code:-
Code: Select all
If request.form("buttonname") <> "" then
    'form was submitted
    'error checking code goes here.
    If anErrorOccured then 
       ShowForm = True
    else
       'Entered info was ok
       'code to update database, etc, etc
    end if
else
    ShowForm = True
end if
If showform then
     'code to show the form
end if
Hope this helps.
__________________
Click the 'Thanks!' button if this post has helped you

Rob - Webforumz Founder
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #3  
Old Sep 8th, 2004, 04:12
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,611
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
well rob...
if i give you a look of my code, will you willing to show me how to code them.
i am having trouble doing the if-else statement in my page especially if it deals with the database connection!

i'll post you soon
thanx for the idea
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #4  
Old Sep 9th, 2004, 01:56
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,611
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Well...actually i have solve that problem.

I have post the form to the same page but i have included the display page under the form so that the user can know that their request have been stored and accepted by the database.

Thanx rob.
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Closed Thread

Tags
validate, database

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
trying to validate css Phixon Web Page Design 12 Oct 2nd, 2007 20:44
Attempt to validate Phixon Web Page Design 11 Jul 24th, 2007 14:25
Why should I validate CSS? spinal007 Web Page Design 13 May 11th, 2007 14:24
XML Code for transfering data from one SQL Server Database to another database plolla Other Programming Languages 1 Aug 3rd, 2006 18:37
validate form Monie Classic ASP 1 Sep 2nd, 2004 09:06


All times are GMT. The time now is 16:48.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42