Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


checking database for the same entry

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,1290
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> checking database for the same entry
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 checking database for the same entry - 8/25/2004 4:09:31 PM   
  Lowis

 

Posts: 2
Score: 0
Joined: 8/25/2004
From: Philippines
Status: offline
hi... i'm making a sign up page. I'm using the 'username' as the primary key in my DATABASE. i want to let the person signing up that his username has already been used ... how do i do that in ASP?

and oh... do teach me how to put the date and time as well the last time this person replied thanks
 
 
Post #: 1
 
 Re: checking database for the same entry - 8/25/2004 4:14:35 PM   
  Lowis

 

Posts: 2
Score: 0
Joined: 8/25/2004
From: Philippines
Status: offline
if the username in the database and the new username punched in by the person signing up is the same the '.update' will not update the file since there are data redundancy so how to fix that please... i wanna tell the person signing up to use another name instead

(in reply to Lowis)
 
 
Post #: 2
 
 Re: checking database for the same entry - 9/15/2004 2:24:02 AM   
  dalejwright22

 

Posts: 11
Score: 0
Joined: 9/15/2004
From: United Kingdom
Status: offline
lowis..

first thing is first, dont have the username as a unique id, have it has a foreing key..

what you need to do is a check of the username, so you could use a simple sql statement to first check for a username entered into a form field being doing a select..

ie..

sql ="SELECT USERNAME FROM TBL WHERE USERNAME = "VAR PASSED IN"

then use the record count prop of the recordset to do the check.. ie

if ors.recordset = 0 Then
Username dosent exist
else
username does exist


this is cheap and dirty but it will give u a basic idea, for a good book try the wrox collections, esp the begineers books

cheers

(in reply to Lowis)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> checking database for the same entry Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts