473,407 Members | 2,314 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Compare two items

I have this login that i created. On the sign in process i need to make sure
that no one has already signed up using that certain email or that unique
cnumber.

Ive tried this line:
Set objRS = verify.execute("SELECT id FROM logmein WHERE email='" & email &
"'") or ("', cnumber= '" & cnumber & "';")

than this:
Set objRS = verify.execute("SELECT id FROM logmein WHERE email='" & email &
"'", "' & or & '", "' cnumber= '" & cnumber & "';")
Anyone know what i did wrong?
Jul 19 '05 #1
12 1577
Set objRS = verify.execute("SELECT id FROM logmein WHERE email='" & email &
"' AND cnumber= '" & cnumber & "'"

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
"Stupid verifcation" <St***************@discussions.microsoft.com> wrote in
message news:3D**********************************@microsof t.com...
I have this login that i created. On the sign in process i need to make sure that no one has already signed up using that certain email or that unique
cnumber.

Ive tried this line:
Set objRS = verify.execute("SELECT id FROM logmein WHERE email='" & email & "'") or ("', cnumber= '" & cnumber & "';")

than this:
Set objRS = verify.execute("SELECT id FROM logmein WHERE email='" & email & "'", "' & or & '", "' cnumber= '" & cnumber & "';")
Anyone know what i did wrong?

Jul 19 '05 #2
Hello Stupid <g>,

Is there something that is making you think that you did something wrong,
i.e. an error message? It looks like you've having issues with
concatenation. Dealing with the task at hand, it appears that your goal is
to have your SQL querystring look like this, where I entered values of
jo*@example.com and JoesCNumber.

s = "SELECT id FROM logmein WHERE email = 'jo*@example.com' or cnumber =
'JoesCNumber'"

So, to get the variable values in there, replace the literal strings above
with
" & varName & "

s = "SELECT id FROM logmein WHERE email = '" & email & "' or cnumber = '" &
cnumber & "'"

Ray at home

"Stupid verifcation" <St***************@discussions.microsoft.com> wrote in
message news:3D**********************************@microsof t.com...
I have this login that i created. On the sign in process i need to make
sure
that no one has already signed up using that certain email or that unique
cnumber.

Ive tried this line:
Set objRS = verify.execute("SELECT id FROM logmein WHERE email='" & email
&
"'") or ("', cnumber= '" & cnumber & "';")

than this:
Set objRS = verify.execute("SELECT id FROM logmein WHERE email='" & email
&
"'", "' & or & '", "' cnumber= '" & cnumber & "';")
Anyone know what i did wrong?

Jul 19 '05 #3
Ive tried that and i get the same errror i get with using or

Incorrect syntax near the keyword cnumber.

"Steven Burn" wrote:
Set objRS = verify.execute("SELECT id FROM logmein WHERE email='" & email &
"' AND cnumber= '" & cnumber & "'"

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
"Stupid verifcation" <St***************@discussions.microsoft.com> wrote in
message news:3D**********************************@microsof t.com...
I have this login that i created. On the sign in process i need to make

sure
that no one has already signed up using that certain email or that unique
cnumber.

Ive tried this line:
Set objRS = verify.execute("SELECT id FROM logmein WHERE email='" & email

&
"'") or ("', cnumber= '" & cnumber & "';")

than this:
Set objRS = verify.execute("SELECT id FROM logmein WHERE email='" & email

&
"'", "' & or & '", "' cnumber= '" & cnumber & "';")
Anyone know what i did wrong?


Jul 19 '05 #4
Yes,

Sorry i have done all of the form inputs. I have all of the input stuff in
there already as well as other verifciaton.

This login was finished a month ago, but we are going to start using this
week, and i needed to add some additional comparision things to make sure
people wernet sharing their cnumbers with anyone else and have them login,
and to make sure no one logs in with same email addy.

"Ray Costanzo [MVP]" wrote:
Hello Stupid <g>,

Is there something that is making you think that you did something wrong,
i.e. an error message? It looks like you've having issues with
concatenation. Dealing with the task at hand, it appears that your goal is
to have your SQL querystring look like this, where I entered values of
jo*@example.com and JoesCNumber.

s = "SELECT id FROM logmein WHERE email = 'jo*@example.com' or cnumber =
'JoesCNumber'"

So, to get the variable values in there, replace the literal strings above
with
" & varName & "

s = "SELECT id FROM logmein WHERE email = '" & email & "' or cnumber = '" &
cnumber & "'"

Ray at home

"Stupid verifcation" <St***************@discussions.microsoft.com> wrote in
message news:3D**********************************@microsof t.com...
I have this login that i created. On the sign in process i need to make
sure
that no one has already signed up using that certain email or that unique
cnumber.

Ive tried this line:
Set objRS = verify.execute("SELECT id FROM logmein WHERE email='" & email
&
"'") or ("', cnumber= '" & cnumber & "';")

than this:
Set objRS = verify.execute("SELECT id FROM logmein WHERE email='" & email
&
"'", "' & or & '", "' cnumber= '" & cnumber & "';")
Anyone know what i did wrong?


Jul 19 '05 #5
What is the error message that you receive when using the query that I
provided? We need to see more code and your error!

Ray at home

"Athmaus" <At*****@discussions.microsoft.com> wrote in message
news:40**********************************@microsof t.com...
Yes,

Sorry i have done all of the form inputs. I have all of the input stuff in
there already as well as other verifciaton.

This login was finished a month ago, but we are going to start using this
week, and i needed to add some additional comparision things to make sure
people wernet sharing their cnumbers with anyone else and have them login,
and to make sure no one logs in with same email addy.

"Ray Costanzo [MVP]" wrote:
Hello Stupid <g>,

Is there something that is making you think that you did something wrong,
i.e. an error message? It looks like you've having issues with
concatenation. Dealing with the task at hand, it appears that your goal
is
to have your SQL querystring look like this, where I entered values of
jo*@example.com and JoesCNumber.

s = "SELECT id FROM logmein WHERE email = 'jo*@example.com' or cnumber =
'JoesCNumber'"

So, to get the variable values in there, replace the literal strings
above
with
" & varName & "

s = "SELECT id FROM logmein WHERE email = '" & email & "' or cnumber =
'" &
cnumber & "'"

Ray at home

"Stupid verifcation" <St***************@discussions.microsoft.com> wrote
in
message news:3D**********************************@microsof t.com...
>I have this login that i created. On the sign in process i need to make
>sure
> that no one has already signed up using that certain email or that
> unique
> cnumber.
>
> Ive tried this line:
> Set objRS = verify.execute("SELECT id FROM logmein WHERE email='" &
> email
> &
> "'") or ("', cnumber= '" & cnumber & "';")
>
> than this:
> Set objRS = verify.execute("SELECT id FROM logmein WHERE email='" &
> email
> &
> "'", "' & or & '", "' cnumber= '" & cnumber & "';")
>
>
> Anyone know what i did wrong?


Jul 19 '05 #6
Did you add the closing ) ??

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
"Athmaus" <At*****@discussions.microsoft.com> wrote in message
news:95**********************************@microsof t.com...
Ive tried that and i get the same errror i get with using or

Incorrect syntax near the keyword cnumber.

"Steven Burn" wrote:
Set objRS = verify.execute("SELECT id FROM logmein WHERE email='" & email & "' AND cnumber= '" & cnumber & "'"

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
"Stupid verifcation" <St***************@discussions.microsoft.com> wrote in message news:3D**********************************@microsof t.com...
I have this login that i created. On the sign in process i need to make
sure
that no one has already signed up using that certain email or that
unique cnumber.

Ive tried this line:
Set objRS = verify.execute("SELECT id FROM logmein WHERE email='" &

email &
"'") or ("', cnumber= '" & cnumber & "';")

than this:
Set objRS = verify.execute("SELECT id FROM logmein WHERE email='" &
email &
"'", "' & or & '", "' cnumber= '" & cnumber & "';")
Anyone know what i did wrong?


Jul 19 '05 #7
here is the entire ASP code of that page: (i left out all of the form stuff
unless you went taht as well).

<%
Function SendEmail()

Dim myMail
Set myMail = CreateObject("CDONTS.NewMail")
HTML = "<!DOCTYPE HTML PUBLIC ""-//IETF//DTD HTML//EN"">" & NL
HTML = HTML & "<html>"
HTML = HTML & "<head>"
HTML = HTML & "<title>Login Information</title>"
HTML = HTML & "</head>"
HTML = HTML & "<center><b>Login Information</b></center>"
HTML = HTML & "<br>Dear: " & Request.Form("fname") & " " &
Request.Form("lname")
HTML = HTML & "<br> <b>User Name: </b>" & Request.Form("email")
HTML = HTML & "<br> <b>Password: </b>" & Request.Form("password")
HTML = HTML & "</body>"
HTML = HTML & "</html>"

myMail.From = "lo***@aaa.com"
myMail.To = Request.Form("email")
myMail.Subject = "Login Information"
myMail.BodyFormat = 0
myMail.MailFormat = 0
myMail.Body = HTML
myMail.Send
End Function
%>

<%
Response.Expires = -1000 'Make sure the browser doesnt cache this page
Response.Buffer = True 'enables our response.redirect to work

If Request.Form("valuepassed") ="true" Then
CheckSignUpForm
Else
ShowSignUpForm
End If

Sub CheckSignUpForm
Dim myconn, verify, blnLoggedIn, first, last, email, cnumber, user, pass,
site, logged, objRS, information

Set verify = Server.CreateObject("ADODB.Connection")
verify.open = "Provider=SQLOLEDB.1;Password=xxx;Persist Security
Info=True;User ID=xxxx;Initial Catalog=xxx;Data Source=xxx"
first = Request.Form("fname")
last = Request.Form("lname")
email = Request.Form("email")
cnumber = Request.Form("cnumber")
'user = Request.Form("username")
pass = Request.Form("password")
site = 1
logged = 0

Set objRS = verify.execute("SELECT id FROM regfreeup WHERE email='" & email
& "'") or ("' cnumber = '" & cnumber & "';")
'Set objRS = verify.execute("SELECT id FROM logmein WHERE username='" &
user & "' OR cnumber ='" & cnumber & "';")
If objRS.EOF Then '''NO RECORDS MATCH. PROCEED WITH LOGIN CREATION
blnLoggedIn = False

information = "INSERT INTO logmein (cnumber, firstname, lastname, email,
pass, site, signup, logged) VALUES('" & cnumber & "', '" & first & "', '" &
last & "', '" & email & "', '" & pass & "', '" & site & "', '" & Now() & "',
'" & logged & "')"
Set Recordset = verify.execute(information)
SendEmail()
Response.Redirect "http://www.yahoo.com"
Else
Response.Redirect "http://www.google.com"
End If

verify.close
set verify = nothing
ShowSignUpForm
End Sub

%>

<% Sub ShowSignUpForm %>

"Ray Costanzo [MVP]" wrote:
What is the error message that you receive when using the query that I
provided? We need to see more code and your error!

Ray at home

"Athmaus" <At*****@discussions.microsoft.com> wrote in message
news:40**********************************@microsof t.com...
Yes,

Sorry i have done all of the form inputs. I have all of the input stuff in
there already as well as other verifciaton.

This login was finished a month ago, but we are going to start using this
week, and i needed to add some additional comparision things to make sure
people wernet sharing their cnumbers with anyone else and have them login,
and to make sure no one logs in with same email addy.

"Ray Costanzo [MVP]" wrote:
Hello Stupid <g>,

Is there something that is making you think that you did something wrong,
i.e. an error message? It looks like you've having issues with
concatenation. Dealing with the task at hand, it appears that your goal
is
to have your SQL querystring look like this, where I entered values of
jo*@example.com and JoesCNumber.

s = "SELECT id FROM logmein WHERE email = 'jo*@example.com' or cnumber =
'JoesCNumber'"

So, to get the variable values in there, replace the literal strings
above
with
" & varName & "

s = "SELECT id FROM logmein WHERE email = '" & email & "' or cnumber =
'" &
cnumber & "'"

Ray at home

"Stupid verifcation" <St***************@discussions.microsoft.com> wrote
in
message news:3D**********************************@microsof t.com...
>I have this login that i created. On the sign in process i need to make
>sure
> that no one has already signed up using that certain email or that
> unique
> cnumber.
>
> Ive tried this line:
> Set objRS = verify.execute("SELECT id FROM logmein WHERE email='" &
> email
> &
> "'") or ("', cnumber= '" & cnumber & "';")
>
> than this:
> Set objRS = verify.execute("SELECT id FROM logmein WHERE email='" &
> email
> &
> "'", "' & or & '", "' cnumber= '" & cnumber & "';")
>
>
> Anyone know what i did wrong?


Jul 19 '05 #8
Again, what is the error?

"Athmaus" <At*****@discussions.microsoft.com> wrote in message
news:77**********************************@microsof t.com...
here is the entire ASP code of that page: (i left out all of the form
stuff
unless you went taht as well).

<%
Function SendEmail()

Dim myMail
Set myMail = CreateObject("CDONTS.NewMail")
HTML = "<!DOCTYPE HTML PUBLIC ""-//IETF//DTD HTML//EN"">" & NL
HTML = HTML & "<html>"
HTML = HTML & "<head>"
HTML = HTML & "<title>Login Information</title>"
HTML = HTML & "</head>"
HTML = HTML & "<center><b>Login Information</b></center>"
HTML = HTML & "<br>Dear: " & Request.Form("fname") & " " &
Request.Form("lname")
HTML = HTML & "<br> <b>User Name: </b>" & Request.Form("email")
HTML = HTML & "<br> <b>Password: </b>" & Request.Form("password")
HTML = HTML & "</body>"
HTML = HTML & "</html>"

myMail.From = "lo***@aaa.com"
myMail.To = Request.Form("email")
myMail.Subject = "Login Information"
myMail.BodyFormat = 0
myMail.MailFormat = 0
myMail.Body = HTML
myMail.Send
End Function
%>

<%
Response.Expires = -1000 'Make sure the browser doesnt cache this page
Response.Buffer = True 'enables our response.redirect to work

If Request.Form("valuepassed") ="true" Then
CheckSignUpForm
Else
ShowSignUpForm
End If

Sub CheckSignUpForm
Dim myconn, verify, blnLoggedIn, first, last, email, cnumber, user, pass,
site, logged, objRS, information

Set verify = Server.CreateObject("ADODB.Connection")
verify.open = "Provider=SQLOLEDB.1;Password=xxx;Persist Security
Info=True;User ID=xxxx;Initial Catalog=xxx;Data Source=xxx"
first = Request.Form("fname")
last = Request.Form("lname")
email = Request.Form("email")
cnumber = Request.Form("cnumber")
'user = Request.Form("username")
pass = Request.Form("password")
site = 1
logged = 0

Set objRS = verify.execute("SELECT id FROM regfreeup WHERE email='" &
email
& "'") or ("' cnumber = '" & cnumber & "';")
'Set objRS = verify.execute("SELECT id FROM logmein WHERE username='" &
user & "' OR cnumber ='" & cnumber & "';")
If objRS.EOF Then '''NO RECORDS MATCH. PROCEED WITH LOGIN CREATION
blnLoggedIn = False

information = "INSERT INTO logmein (cnumber, firstname, lastname, email,
pass, site, signup, logged) VALUES('" & cnumber & "', '" & first & "', '"
&
last & "', '" & email & "', '" & pass & "', '" & site & "', '" & Now() &
"',
'" & logged & "')"
Set Recordset = verify.execute(information)
SendEmail()
Response.Redirect "http://www.yahoo.com"
Else
Response.Redirect "http://www.google.com"
End If

verify.close
set verify = nothing
ShowSignUpForm
End Sub

%>

<% Sub ShowSignUpForm %>

"Ray Costanzo [MVP]" wrote:
What is the error message that you receive when using the query that I
provided? We need to see more code and your error!

Ray at home

"Athmaus" <At*****@discussions.microsoft.com> wrote in message
news:40**********************************@microsof t.com...
> Yes,
>
> Sorry i have done all of the form inputs. I have all of the input stuff
> in
> there already as well as other verifciaton.
>
> This login was finished a month ago, but we are going to start using
> this
> week, and i needed to add some additional comparision things to make
> sure
> people wernet sharing their cnumbers with anyone else and have them
> login,
> and to make sure no one logs in with same email addy.
>
> "Ray Costanzo [MVP]" wrote:
>
>> Hello Stupid <g>,
>>
>> Is there something that is making you think that you did something
>> wrong,
>> i.e. an error message? It looks like you've having issues with
>> concatenation. Dealing with the task at hand, it appears that your
>> goal
>> is
>> to have your SQL querystring look like this, where I entered values of
>> jo*@example.com and JoesCNumber.
>>
>> s = "SELECT id FROM logmein WHERE email = 'jo*@example.com' or cnumber
>> =
>> 'JoesCNumber'"
>>
>> So, to get the variable values in there, replace the literal strings
>> above
>> with
>> " & varName & "
>>
>> s = "SELECT id FROM logmein WHERE email = '" & email & "' or cnumber
>> =
>> '" &
>> cnumber & "'"
>>
>> Ray at home
>>
>>
>>
>> "Stupid verifcation" <St***************@discussions.microsoft.com>
>> wrote
>> in
>> message news:3D**********************************@microsof t.com...
>> >I have this login that i created. On the sign in process i need to
>> >make
>> >sure
>> > that no one has already signed up using that certain email or that
>> > unique
>> > cnumber.
>> >
>> > Ive tried this line:
>> > Set objRS = verify.execute("SELECT id FROM logmein WHERE email='" &
>> > email
>> > &
>> > "'") or ("', cnumber= '" & cnumber & "';")
>> >
>> > than this:
>> > Set objRS = verify.execute("SELECT id FROM logmein WHERE email='" &
>> > email
>> > &
>> > "'", "' & or & '", "' cnumber= '" & cnumber & "';")
>> >
>> >
>> > Anyone know what i did wrong?
>>
>>
>>


Jul 19 '05 #9
sorry here it is:

Microsoft OLE DB Provider for SQL Server error '80040e14'

Incorrect syntax near the keyword 'order'.

"Ray Costanzo [MVP]" wrote:
Again, what is the error?

"Athmaus" <At*****@discussions.microsoft.com> wrote in message
news:77**********************************@microsof t.com...
here is the entire ASP code of that page: (i left out all of the form
stuff
unless you went taht as well).

<%
Function SendEmail()

Dim myMail
Set myMail = CreateObject("CDONTS.NewMail")
HTML = "<!DOCTYPE HTML PUBLIC ""-//IETF//DTD HTML//EN"">" & NL
HTML = HTML & "<html>"
HTML = HTML & "<head>"
HTML = HTML & "<title>Login Information</title>"
HTML = HTML & "</head>"
HTML = HTML & "<center><b>Login Information</b></center>"
HTML = HTML & "<br>Dear: " & Request.Form("fname") & " " &
Request.Form("lname")
HTML = HTML & "<br> <b>User Name: </b>" & Request.Form("email")
HTML = HTML & "<br> <b>Password: </b>" & Request.Form("password")
HTML = HTML & "</body>"
HTML = HTML & "</html>"

myMail.From = "lo***@aaa.com"
myMail.To = Request.Form("email")
myMail.Subject = "Login Information"
myMail.BodyFormat = 0
myMail.MailFormat = 0
myMail.Body = HTML
myMail.Send
End Function
%>

<%
Response.Expires = -1000 'Make sure the browser doesnt cache this page
Response.Buffer = True 'enables our response.redirect to work

If Request.Form("valuepassed") ="true" Then
CheckSignUpForm
Else
ShowSignUpForm
End If

Sub CheckSignUpForm
Dim myconn, verify, blnLoggedIn, first, last, email, cnumber, user, pass,
site, logged, objRS, information

Set verify = Server.CreateObject("ADODB.Connection")
verify.open = "Provider=SQLOLEDB.1;Password=xxx;Persist Security
Info=True;User ID=xxxx;Initial Catalog=xxx;Data Source=xxx"
first = Request.Form("fname")
last = Request.Form("lname")
email = Request.Form("email")
cnumber = Request.Form("cnumber")
'user = Request.Form("username")
pass = Request.Form("password")
site = 1
logged = 0

Set objRS = verify.execute("SELECT id FROM regfreeup WHERE email='" &
email
& "'") or ("' cnumber = '" & cnumber & "';")
'Set objRS = verify.execute("SELECT id FROM logmein WHERE username='" &
user & "' OR cnumber ='" & cnumber & "';")
If objRS.EOF Then '''NO RECORDS MATCH. PROCEED WITH LOGIN CREATION
blnLoggedIn = False

information = "INSERT INTO logmein (cnumber, firstname, lastname, email,
pass, site, signup, logged) VALUES('" & cnumber & "', '" & first & "', '"
&
last & "', '" & email & "', '" & pass & "', '" & site & "', '" & Now() &
"',
'" & logged & "')"
Set Recordset = verify.execute(information)
SendEmail()
Response.Redirect "http://www.yahoo.com"
Else
Response.Redirect "http://www.google.com"
End If

verify.close
set verify = nothing
ShowSignUpForm
End Sub

%>

<% Sub ShowSignUpForm %>

"Ray Costanzo [MVP]" wrote:
What is the error message that you receive when using the query that I
provided? We need to see more code and your error!

Ray at home

"Athmaus" <At*****@discussions.microsoft.com> wrote in message
news:40**********************************@microsof t.com...
> Yes,
>
> Sorry i have done all of the form inputs. I have all of the input stuff
> in
> there already as well as other verifciaton.
>
> This login was finished a month ago, but we are going to start using
> this
> week, and i needed to add some additional comparision things to make
> sure
> people wernet sharing their cnumbers with anyone else and have them
> login,
> and to make sure no one logs in with same email addy.
>
> "Ray Costanzo [MVP]" wrote:
>
>> Hello Stupid <g>,
>>
>> Is there something that is making you think that you did something
>> wrong,
>> i.e. an error message? It looks like you've having issues with
>> concatenation. Dealing with the task at hand, it appears that your
>> goal
>> is
>> to have your SQL querystring look like this, where I entered values of
>> jo*@example.com and JoesCNumber.
>>
>> s = "SELECT id FROM logmein WHERE email = 'jo*@example.com' or cnumber
>> =
>> 'JoesCNumber'"
>>
>> So, to get the variable values in there, replace the literal strings
>> above
>> with
>> " & varName & "
>>
>> s = "SELECT id FROM logmein WHERE email = '" & email & "' or cnumber
>> =
>> '" &
>> cnumber & "'"
>>
>> Ray at home
>>
>>
>>
>> "Stupid verifcation" <St***************@discussions.microsoft.com>
>> wrote
>> in
>> message news:3D**********************************@microsof t.com...
>> >I have this login that i created. On the sign in process i need to
>> >make
>> >sure
>> > that no one has already signed up using that certain email or that
>> > unique
>> > cnumber.
>> >
>> > Ive tried this line:
>> > Set objRS = verify.execute("SELECT id FROM logmein WHERE email='" &
>> > email
>> > &
>> > "'") or ("', cnumber= '" & cnumber & "';")
>> >
>> > than this:
>> > Set objRS = verify.execute("SELECT id FROM logmein WHERE email='" &
>> > email
>> > &
>> > "'", "' & or & '", "' cnumber= '" & cnumber & "';")
>> >
>> >
>> > Anyone know what i did wrong?
>>
>>
>>


Jul 19 '05 #10
What line?!!!!!!!!

"order" does not even appear anywhere in the code you posted. Please read
this. http://www.aspfaq.com/show.asp?id=2081

Ray at home

"Athmaus" <At*****@discussions.microsoft.com> wrote in message
news:5B**********************************@microsof t.com...
sorry here it is:

Microsoft OLE DB Provider for SQL Server error '80040e14'

Incorrect syntax near the keyword 'order'.

"Ray Costanzo [MVP]" wrote:
Again, what is the error?

"Athmaus" <At*****@discussions.microsoft.com> wrote in message
news:77**********************************@microsof t.com...
> here is the entire ASP code of that page: (i left out all of the form
> stuff
> unless you went taht as well).
>
> <%
> Function SendEmail()
>
> Dim myMail
> Set myMail = CreateObject("CDONTS.NewMail")
> HTML = "<!DOCTYPE HTML PUBLIC ""-//IETF//DTD HTML//EN"">" & NL
> HTML = HTML & "<html>"
> HTML = HTML & "<head>"
> HTML = HTML & "<title>Login Information</title>"
> HTML = HTML & "</head>"
> HTML = HTML & "<center><b>Login Information</b></center>"
> HTML = HTML & "<br>Dear: " & Request.Form("fname") & " " &
> Request.Form("lname")
> HTML = HTML & "<br> <b>User Name: </b>" & Request.Form("email")
> HTML = HTML & "<br> <b>Password: </b>" & Request.Form("password")
> HTML = HTML & "</body>"
> HTML = HTML & "</html>"
>
> myMail.From = "lo***@aaa.com"
> myMail.To = Request.Form("email")
> myMail.Subject = "Login Information"
> myMail.BodyFormat = 0
> myMail.MailFormat = 0
> myMail.Body = HTML
> myMail.Send
> End Function
> %>
>
> <%
> Response.Expires = -1000 'Make sure the browser doesnt cache this page
> Response.Buffer = True 'enables our response.redirect to work
>
> If Request.Form("valuepassed") ="true" Then
> CheckSignUpForm
> Else
> ShowSignUpForm
> End If
>
> Sub CheckSignUpForm
> Dim myconn, verify, blnLoggedIn, first, last, email, cnumber, user,
> pass,
> site, logged, objRS, information
>
> Set verify = Server.CreateObject("ADODB.Connection")
> verify.open = "Provider=SQLOLEDB.1;Password=xxx;Persist Security
> Info=True;User ID=xxxx;Initial Catalog=xxx;Data Source=xxx"
>
>
> first = Request.Form("fname")
> last = Request.Form("lname")
> email = Request.Form("email")
> cnumber = Request.Form("cnumber")
> 'user = Request.Form("username")
> pass = Request.Form("password")
> site = 1
> logged = 0
>
> Set objRS = verify.execute("SELECT id FROM regfreeup WHERE email='" &
> email
> & "'") or ("' cnumber = '" & cnumber & "';")
> 'Set objRS = verify.execute("SELECT id FROM logmein WHERE username='"
> &
> user & "' OR cnumber ='" & cnumber & "';")
> If objRS.EOF Then '''NO RECORDS MATCH. PROCEED WITH LOGIN CREATION
> blnLoggedIn = False
>
> information = "INSERT INTO logmein (cnumber, firstname, lastname,
> email,
> pass, site, signup, logged) VALUES('" & cnumber & "', '" & first & "',
> '"
> &
> last & "', '" & email & "', '" & pass & "', '" & site & "', '" & Now()
> &
> "',
> '" & logged & "')"
> Set Recordset = verify.execute(information)
> SendEmail()
> Response.Redirect "http://www.yahoo.com"
> Else
> Response.Redirect "http://www.google.com"
> End If
>
> verify.close
> set verify = nothing
>
>
> ShowSignUpForm
> End Sub
>
> %>
>
> <% Sub ShowSignUpForm %>
>
> "Ray Costanzo [MVP]" wrote:
>
>> What is the error message that you receive when using the query that I
>> provided? We need to see more code and your error!
>>
>> Ray at home
>>
>> "Athmaus" <At*****@discussions.microsoft.com> wrote in message
>> news:40**********************************@microsof t.com...
>> > Yes,
>> >
>> > Sorry i have done all of the form inputs. I have all of the input
>> > stuff
>> > in
>> > there already as well as other verifciaton.
>> >
>> > This login was finished a month ago, but we are going to start using
>> > this
>> > week, and i needed to add some additional comparision things to make
>> > sure
>> > people wernet sharing their cnumbers with anyone else and have them
>> > login,
>> > and to make sure no one logs in with same email addy.
>> >
>> > "Ray Costanzo [MVP]" wrote:
>> >
>> >> Hello Stupid <g>,
>> >>
>> >> Is there something that is making you think that you did something
>> >> wrong,
>> >> i.e. an error message? It looks like you've having issues with
>> >> concatenation. Dealing with the task at hand, it appears that your
>> >> goal
>> >> is
>> >> to have your SQL querystring look like this, where I entered values
>> >> of
>> >> jo*@example.com and JoesCNumber.
>> >>
>> >> s = "SELECT id FROM logmein WHERE email = 'jo*@example.com' or
>> >> cnumber
>> >> =
>> >> 'JoesCNumber'"
>> >>
>> >> So, to get the variable values in there, replace the literal
>> >> strings
>> >> above
>> >> with
>> >> " & varName & "
>> >>
>> >> s = "SELECT id FROM logmein WHERE email = '" & email & "' or
>> >> cnumber
>> >> =
>> >> '" &
>> >> cnumber & "'"
>> >>
>> >> Ray at home
>> >>
>> >>
>> >>
>> >> "Stupid verifcation" <St***************@discussions.microsoft.com>
>> >> wrote
>> >> in
>> >> message news:3D**********************************@microsof t.com...
>> >> >I have this login that i created. On the sign in process i need to
>> >> >make
>> >> >sure
>> >> > that no one has already signed up using that certain email or
>> >> > that
>> >> > unique
>> >> > cnumber.
>> >> >
>> >> > Ive tried this line:
>> >> > Set objRS = verify.execute("SELECT id FROM logmein WHERE email='"
>> >> > &
>> >> > email
>> >> > &
>> >> > "'") or ("', cnumber= '" & cnumber & "';")
>> >> >
>> >> > than this:
>> >> > Set objRS = verify.execute("SELECT id FROM logmein WHERE email='"
>> >> > &
>> >> > email
>> >> > &
>> >> > "'", "' & or & '", "' cnumber= '" & cnumber & "';")
>> >> >
>> >> >
>> >> > Anyone know what i did wrong?
>> >>
>> >>
>> >>
>>
>>
>>


Jul 19 '05 #11
It is the exact same line that i posted in the first post, that has not
changed.......

Set objRS = verify.execute("SELECT id FROM regfreeup WHERE email='" & email
& "'") or ("' cnumber = '" & cnumber & "';")

By order i mean cnumber, sorry bout that

"Ray Costanzo [MVP]" wrote:
What line?!!!!!!!!

"order" does not even appear anywhere in the code you posted. Please read
this. http://www.aspfaq.com/show.asp?id=2081

Ray at home

"Athmaus" <At*****@discussions.microsoft.com> wrote in message
news:5B**********************************@microsof t.com...
sorry here it is:

Microsoft OLE DB Provider for SQL Server error '80040e14'

Incorrect syntax near the keyword 'order'.

"Ray Costanzo [MVP]" wrote:
Again, what is the error?

"Athmaus" <At*****@discussions.microsoft.com> wrote in message
news:77**********************************@microsof t.com...
> here is the entire ASP code of that page: (i left out all of the form
> stuff
> unless you went taht as well).
>
> <%
> Function SendEmail()
>
> Dim myMail
> Set myMail = CreateObject("CDONTS.NewMail")
> HTML = "<!DOCTYPE HTML PUBLIC ""-//IETF//DTD HTML//EN"">" & NL
> HTML = HTML & "<html>"
> HTML = HTML & "<head>"
> HTML = HTML & "<title>Login Information</title>"
> HTML = HTML & "</head>"
> HTML = HTML & "<center><b>Login Information</b></center>"
> HTML = HTML & "<br>Dear: " & Request.Form("fname") & " " &
> Request.Form("lname")
> HTML = HTML & "<br> <b>User Name: </b>" & Request.Form("email")
> HTML = HTML & "<br> <b>Password: </b>" & Request.Form("password")
> HTML = HTML & "</body>"
> HTML = HTML & "</html>"
>
> myMail.From = "lo***@aaa.com"
> myMail.To = Request.Form("email")
> myMail.Subject = "Login Information"
> myMail.BodyFormat = 0
> myMail.MailFormat = 0
> myMail.Body = HTML
> myMail.Send
> End Function
> %>
>
> <%
> Response.Expires = -1000 'Make sure the browser doesnt cache this page
> Response.Buffer = True 'enables our response.redirect to work
>
> If Request.Form("valuepassed") ="true" Then
> CheckSignUpForm
> Else
> ShowSignUpForm
> End If
>
> Sub CheckSignUpForm
> Dim myconn, verify, blnLoggedIn, first, last, email, cnumber, user,
> pass,
> site, logged, objRS, information
>
> Set verify = Server.CreateObject("ADODB.Connection")
> verify.open = "Provider=SQLOLEDB.1;Password=xxx;Persist Security
> Info=True;User ID=xxxx;Initial Catalog=xxx;Data Source=xxx"
>
>
> first = Request.Form("fname")
> last = Request.Form("lname")
> email = Request.Form("email")
> cnumber = Request.Form("cnumber")
> 'user = Request.Form("username")
> pass = Request.Form("password")
> site = 1
> logged = 0
>
> Set objRS = verify.execute("SELECT id FROM regfreeup WHERE email='" &
> email
> & "'") or ("' cnumber = '" & cnumber & "';")
> 'Set objRS = verify.execute("SELECT id FROM logmein WHERE username='"
> &
> user & "' OR cnumber ='" & cnumber & "';")
> If objRS.EOF Then '''NO RECORDS MATCH. PROCEED WITH LOGIN CREATION
> blnLoggedIn = False
>
> information = "INSERT INTO logmein (cnumber, firstname, lastname,
> email,
> pass, site, signup, logged) VALUES('" & cnumber & "', '" & first & "',
> '"
> &
> last & "', '" & email & "', '" & pass & "', '" & site & "', '" & Now()
> &
> "',
> '" & logged & "')"
> Set Recordset = verify.execute(information)
> SendEmail()
> Response.Redirect "http://www.yahoo.com"
> Else
> Response.Redirect "http://www.google.com"
> End If
>
> verify.close
> set verify = nothing
>
>
> ShowSignUpForm
> End Sub
>
> %>
>
> <% Sub ShowSignUpForm %>
>
> "Ray Costanzo [MVP]" wrote:
>
>> What is the error message that you receive when using the query that I
>> provided? We need to see more code and your error!
>>
>> Ray at home
>>
>> "Athmaus" <At*****@discussions.microsoft.com> wrote in message
>> news:40**********************************@microsof t.com...
>> > Yes,
>> >
>> > Sorry i have done all of the form inputs. I have all of the input
>> > stuff
>> > in
>> > there already as well as other verifciaton.
>> >
>> > This login was finished a month ago, but we are going to start using
>> > this
>> > week, and i needed to add some additional comparision things to make
>> > sure
>> > people wernet sharing their cnumbers with anyone else and have them
>> > login,
>> > and to make sure no one logs in with same email addy.
>> >
>> > "Ray Costanzo [MVP]" wrote:
>> >
>> >> Hello Stupid <g>,
>> >>
>> >> Is there something that is making you think that you did something
>> >> wrong,
>> >> i.e. an error message? It looks like you've having issues with
>> >> concatenation. Dealing with the task at hand, it appears that your
>> >> goal
>> >> is
>> >> to have your SQL querystring look like this, where I entered values
>> >> of
>> >> jo*@example.com and JoesCNumber.
>> >>
>> >> s = "SELECT id FROM logmein WHERE email = 'jo*@example.com' or
>> >> cnumber
>> >> =
>> >> 'JoesCNumber'"
>> >>
>> >> So, to get the variable values in there, replace the literal
>> >> strings
>> >> above
>> >> with
>> >> " & varName & "
>> >>
>> >> s = "SELECT id FROM logmein WHERE email = '" & email & "' or
>> >> cnumber
>> >> =
>> >> '" &
>> >> cnumber & "'"
>> >>
>> >> Ray at home
>> >>
>> >>
>> >>
>> >> "Stupid verifcation" <St***************@discussions.microsoft.com>
>> >> wrote
>> >> in
>> >> message news:3D**********************************@microsof t.com...
>> >> >I have this login that i created. On the sign in process i need to
>> >> >make
>> >> >sure
>> >> > that no one has already signed up using that certain email or
>> >> > that
>> >> > unique
>> >> > cnumber.
>> >> >
>> >> > Ive tried this line:
>> >> > Set objRS = verify.execute("SELECT id FROM logmein WHERE email='"
>> >> > &
>> >> > email
>> >> > &
>> >> > "'") or ("', cnumber= '" & cnumber & "';")
>> >> >
>> >> > than this:
>> >> > Set objRS = verify.execute("SELECT id FROM logmein WHERE email='"
>> >> > &
>> >> > email
>> >> > &
>> >> > "'", "' & or & '", "' cnumber= '" & cnumber & "';")
>> >> >
>> >> >
>> >> > Anyone know what i did wrong?
>> >>
>> >>
>> >>
>>
>>
>>


Jul 19 '05 #12

"Athmaus" <At*****@discussions.microsoft.com> wrote in message
news:76**********************************@microsof t.com...
It is the exact same line that i posted in the first post, that has not
changed.......
See Steve Burn's response from a couple of hours ago.

Set objRS = verify.execute("SELECT id FROM regfreeup WHERE email='" &
email
& "'") or ("' cnumber = '" & cnumber & "';")

By order i mean cnumber, sorry bout that


Any time you're posting code or an error or anything else that can help us
help you, please copy and paste it as opposed to retyping it. Also, when in
doubt, do a

REPSONSE.WRITE yourSQLString
RESPONSE.END

What does that look like? Can you paste that into Query Analyzer and run
it? If not, can you see why not?

Also, in order to get help more easily, indicate what line the error is
occurring on. This thread could have gone like this:

========Athmaus
I'm getting this error:
Microsoft OLE DB Provider for SQL Server error '80040e14'

Incorrect syntax near the keyword 'order'.

with this code snippet:
Set verify = Server.CreateObject("ADODB.Connection")
verify.open = "Provider=SQLOLEDB.1;Password=xxx;Persist Security
Info=True;User ID=xxxx;Initial Catalog=xxx;Data Source=xxx"

'''vvvv This line causes the error
Set objRS = verify.execute("SELECT id FROM regfreeup WHERE email='" & email
& "'") or ("' cnumber = '" & cnumber & "';")
========Steve Burn
You're missing a ) at the end of your query. Response.Write the string to
see.
========Bob Barrows
Use stored procedures.

Ray at home
Jul 19 '05 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Richard Hollenbeck | last post by:
I'm trying to write some code that will convert any of the most popular standard date formats twice in to something like "dd Mmm yyyy" (i.e. 08 Jan 1908) and compare the first with the second and...
3
by: pagates | last post by:
Hello Gurus, I have a listview, and I only want to add unique items. The problem is, my code is blowing by my "Contains" statement, adding the item, and then hitting my Compare code in the...
5
by: rcolby | last post by:
Evening, Wondering if someone can point me in the right direction, on how I would compare a system.guid with a system.byte. system.guid (pulled from sql server table with a data type of...
2
by: http://www.visual-basic-data-mining.net/forum | last post by:
Hi... Say i have this string call "data" in Form1, this string contains number "5" value.... how do i pass this string to the Form2 and compare with the combo box items... The combo box ...
4
by: Justin Emlay | last post by:
I have two lists. These can be in either table form or array. That is, my data is in a dataset which I can move to an array if need be. ListA is a master list and it contains all items. ListB...
0
by: segue | last post by:
I have two listbox arrays 1 dimensional. They have the same items but in a different order. Depending on the order of the second newer listbox I'm constructing a querystring to sort the order...
0
by: ruthfish | last post by:
I am used to using VB6 and trying to work in VB.NET as my school have switched to it. I need to compare all the items loading into a combo box to items being read from an array from a text file...
4
by: rdraider | last post by:
We have an inventory table (Items) that contains item_no and qty_on_hand fields. Another table (Item_Serial) contains serial numbers for any item that has serial numbers. If an item has 10...
2
by: anukraju07 | last post by:
Hi, I am new to VB programming and got stuck up at a place where I want to compare two items in two list boxes. The idea is to avoid recurrence of the same item in the second list box (items are...
5
by: =?Utf-8?B?c2lwcHl1Y29ubg==?= | last post by:
Hi I have a Container that is an an Array List of Class Each ArrayList element can be the class or a another ArrayList of Class So there the ArrayList could look like Element 1 - Class...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.