| Author |
Topic Search Topic Options
|
cheops@collecto
Groupie
Joined: 14 January 2004
Location: Denmark
Status: Offline
Points: 53
|
Post Options
Thanks(0)
Quote Reply
Topic: where can I find a asp database search... Posted: 24 January 2004 at 8:28pm |
Hi
I have been looking everywhere for a asp code that can search my database member table for names, allowing people to see/test if there member names are taken, before they send me a registration request
information like this, is what I want the code to be able to give back:
Option 1: There is no user, with that name – you are free to register that name
Option 2: that username is taking – you can not use that name
I hope this clears what type of search code I need...
Does anyone know where I can find an asp code with that function…??
Edited by cheops@collecto
|
|
Sorry for my bad 3nglish..!!
|
 |
dpyers
Senior Member
Joined: 12 May 2003
Status: Offline
Points: 3937
|
Post Options
Thanks(0)
Quote Reply
Posted: 24 January 2004 at 9:48pm |
Check for an existing username is already done in register.asp. Look around line 571 in version 7.7.
You may also want to do the code in register.asp that validates UserName as you don't want to ok a name that won't pass validation for bad words, illegal characters, etc.
|
Lead me not into temptation... I know the short cut, follow me.
|
 |
cheops@collecto
Groupie
Joined: 14 January 2004
Location: Denmark
Status: Offline
Points: 53
|
Post Options
Thanks(0)
Quote Reply
Posted: 25 January 2004 at 12:09am |
Thanks for your answer - but it’s not for the wwf forum.
I need this function for a intern page in our network, where people need to get there "username" checked, BEFORE they get registered in our wwf forum, then after there usernames are check, they send there requests to me with a list of requested usernames, in priority order...
so I guess that I basically need a piece of non wwf code

|
|
Sorry for my bad 3nglish..!!
|
 |
dpyers
Senior Member
Joined: 12 May 2003
Status: Offline
Points: 3937
|
Post Options
Thanks(0)
Quote Reply
Posted: 25 January 2004 at 1:06am |
Google is your friend
http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8 &q=%22asp+database+search%22&spell=1
But seriously, sounds like you just need to do a simple SQL query and check the results.
BTW... Access or MSsql?
Edited by dpyers
|
Lead me not into temptation... I know the short cut, follow me.
|
 |
cheops@collecto
Groupie
Joined: 14 January 2004
Location: Denmark
Status: Offline
Points: 53
|
Post Options
Thanks(0)
Quote Reply
Posted: 25 January 2004 at 5:34pm |
I use Access.....
I have searched on google but can seem to find any type of database search code that can deliver my request.....the 2 options I want the result to be is either
Option 1: There is no user, with that name – you are free to register that name
Option 2: that username is taking – you can not use that name
I don’t want the search result to be shown... only a "username taken" or "username not taken" search result.
|
|
Sorry for my bad 3nglish..!!
|
 |
dpyers
Senior Member
Joined: 12 May 2003
Status: Offline
Points: 3937
|
Post Options
Thanks(0)
Quote Reply
Posted: 25 January 2004 at 6:46pm |
|
I may be missing something here , but if you search a data base field for a string and it comes back with the string you searched for, you know it's taken. If it doesn't come back with what you searched for, you know it's not taken.
|
Lead me not into temptation... I know the short cut, follow me.
|
 |
cheops@collecto
Groupie
Joined: 14 January 2004
Location: Denmark
Status: Offline
Points: 53
|
Post Options
Thanks(0)
Quote Reply
Posted: 25 January 2004 at 6:58pm |
dpyers wrote:
I may be missing something here , but if you search a data base field for a string and it comes back with the string you searched for, you know it's taken. If it doesn't come back with what you searched for, you know it's not taken. |
hehe yes.. I can understand you are confused, but it’s because I don't want the people searching the database to see the result, only letting them know if they can get the name or not
|
|
Sorry for my bad 3nglish..!!
|
 |
dpyers
Senior Member
Joined: 12 May 2003
Status: Offline
Points: 3937
|
Post Options
Thanks(0)
Quote Reply
Posted: 25 January 2004 at 7:24pm |
Why would you show them the result? If the name comes back from the search, just write a line saying that name is taken, try another one.
Whaever happens after the search depends upon what you code. They don't automatically see anything.
|
Lead me not into temptation... I know the short cut, follow me.
|
 |