Compare two items

Discussion in 'ASP General' started by Stupid verifcation, Oct 12, 2004.

  1. 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?
     
    Stupid verifcation, Oct 12, 2004
    #1
    1. Advertising

  2. Stupid verifcation

    Steven Burn Guest

    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" <> wrote in
    message news:...
    > 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?
     
    Steven Burn, Oct 12, 2004
    #2
    1. Advertising

  3. 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
    and JoesCNumber.

    s = "SELECT id FROM logmein WHERE email = '' 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" <> wrote in
    message news:...
    >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?
     
    Ray Costanzo [MVP], Oct 12, 2004
    #3
  4. Stupid verifcation

    Athmaus Guest

    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" <> wrote in
    > message news:...
    > > 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?

    >
    >
    >
     
    Athmaus, Oct 12, 2004
    #4
  5. Stupid verifcation

    Athmaus Guest

    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
    > and JoesCNumber.
    >
    > s = "SELECT id FROM logmein WHERE email = '' 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" <> wrote in
    > message news:...
    > >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?

    >
    >
    >
     
    Athmaus, Oct 12, 2004
    #5
  6. 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" <> wrote in message
    news:...
    > 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
    >> and JoesCNumber.
    >>
    >> s = "SELECT id FROM logmein WHERE email = '' 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" <> wrote
    >> in
    >> message news:...
    >> >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?

    >>
    >>
    >>
     
    Ray Costanzo [MVP], Oct 13, 2004
    #6
  7. Stupid verifcation

    Steven Burn Guest

    Did you add the closing ) ??

    --

    Regards

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

    Keeping it FREE!


    "Athmaus" <> wrote in message
    news:...
    > 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" <> wrote

    in
    > > message news:...
    > > > 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?

    > >
    > >
    > >
     
    Steven Burn, Oct 13, 2004
    #7
  8. Stupid verifcation

    Athmaus Guest

    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 = ""
    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" <> wrote in message
    > news:...
    > > 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
    > >> and JoesCNumber.
    > >>
    > >> s = "SELECT id FROM logmein WHERE email = '' 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" <> wrote
    > >> in
    > >> message news:...
    > >> >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?
    > >>
    > >>
    > >>

    >
    >
    >
     
    Athmaus, Oct 13, 2004
    #8
  9. Again, what is the error?

    "Athmaus" <> wrote in message
    news:...
    > 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 = ""
    > 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" <> wrote in message
    >> news:...
    >> > 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
    >> >> and JoesCNumber.
    >> >>
    >> >> s = "SELECT id FROM logmein WHERE email = '' 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" <>
    >> >> wrote
    >> >> in
    >> >> message news:...
    >> >> >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?
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>
     
    Ray Costanzo [MVP], Oct 13, 2004
    #9
  10. Stupid verifcation

    Athmaus Guest

    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" <> wrote in message
    > news:...
    > > 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 = ""
    > > 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" <> wrote in message
    > >> news:...
    > >> > 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
    > >> >> and JoesCNumber.
    > >> >>
    > >> >> s = "SELECT id FROM logmein WHERE email = '' 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" <>
    > >> >> wrote
    > >> >> in
    > >> >> message news:...
    > >> >> >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?
    > >> >>
    > >> >>
    > >> >>
    > >>
    > >>
    > >>

    >
    >
    >
     
    Athmaus, Oct 13, 2004
    #10
  11. 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" <> wrote in message
    news:...
    > 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" <> wrote in message
    >> news:...
    >> > 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 = ""
    >> > 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" <> wrote in message
    >> >> news:...
    >> >> > 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
    >> >> >> and JoesCNumber.
    >> >> >>
    >> >> >> s = "SELECT id FROM logmein WHERE email = '' 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" <>
    >> >> >> wrote
    >> >> >> in
    >> >> >> message news:...
    >> >> >> >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?
    >> >> >>
    >> >> >>
    >> >> >>
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>
     
    Ray Costanzo [MVP], Oct 13, 2004
    #11
  12. Stupid verifcation

    Athmaus Guest

    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" <> wrote in message
    > news:...
    > > 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" <> wrote in message
    > >> news:...
    > >> > 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 = ""
    > >> > 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" <> wrote in message
    > >> >> news:...
    > >> >> > 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
    > >> >> >> and JoesCNumber.
    > >> >> >>
    > >> >> >> s = "SELECT id FROM logmein WHERE email = '' 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" <>
    > >> >> >> wrote
    > >> >> >> in
    > >> >> >> message news:...
    > >> >> >> >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?
    > >> >> >>
    > >> >> >>
    > >> >> >>
    > >> >>
    > >> >>
    > >> >>
    > >>
    > >>
    > >>

    >
    >
    >
     
    Athmaus, Oct 13, 2004
    #12
  13. "Athmaus" <> wrote in message
    news:...
    > 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
     
    Ray Costanzo [MVP], Oct 13, 2004
    #13
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gilles Kuhn
    Replies:
    0
    Views:
    456
    Gilles Kuhn
    Sep 15, 2003
  2. Bart Van Hemelen
    Replies:
    2
    Views:
    4,720
    Bart Van Hemelen
    Sep 4, 2006
  3. GenxLogic
    Replies:
    3
    Views:
    1,379
    andrewmcdonagh
    Dec 6, 2006
  4. Larry Bud
    Replies:
    13
    Views:
    7,817
    Larry Bud
    Jan 7, 2008
  5. Matt Herzog

    compare items in list to x

    Matt Herzog, Nov 2, 2008, in forum: Python
    Replies:
    1
    Views:
    300
    Bruno Desthuilliers
    Nov 2, 2008
Loading...

Share This Page