Ask a Question related to ASP Database, Design and Development.
-
matt ahorn #1
string comparison and increments
on our work registration system we use the first part of the email
address (eg. john.smith) as the username for the registrant, the user
has no choice of username.
When a user register I want to determine if the username already exists
in the db and if it does, modify the username so it will be unique.
I want to modify the username by adding a number on the end. How do I do
this?
note: There are a number of domains in use at work so cannot always
guarentee username uniqueness
I was thinking i would have something like:
varEmailUserName = request.form(FirstPartOfEmailAddress)
varEmailUserName = john.smith 'for example
strsql="SELECT loginid FROM Users WHERE loginid LIKE
'"&varEmailUserName&"'
set rs=conn.Execute(strsql)
If rs.bof and rs.eof then
'unique username will be available
else
'username will exist
'how do i manipulate john.smith to john.smith1
'also john.smith1 must be unique
end if
all help greatfully received
cheers
matt
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
matt ahorn Guest
-
#40115 [Bgs->Csd]: String Comparison shows odd results for integer values around -2^31
ID: 40115 User updated by: jannisbreitwieser at web dot de Reported By: jannisbreitwieser at web dot de -Status: ... -
#39084 [NEW]: string casting and comparison with ==
From: stevebird at gmx dot de Operating system: PHP version: 5.1.6 PHP Bug Type: Strings related Bug description: string... -
String replace and comparison
Hi, I am trying to replace the accented character in a string and compare with the standard string. This code is not working. Could you please help... -
String Comparison
im having trouble comparing two strings togeather. this code always returns false. please help! -
String Comparison Confusion
Hi, can someone please explain why the line puts "YES" if x == 0 returns nil? Does ruby convert x to a fixnum or convert 0 to a string? Either... -
matt ahorn #2
Re: string comparison and increments
Aaron & Ray
cheers for the advice. It's a registration system for intranet
application, it's just that i work for a large company that uses at
least 5 email domains. the actual application locks out accounts after 3
invalid logins, so not too fussed if people know other logins...
cheers
matt
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
matt ahorn Guest



Reply With Quote

