Script errors

Discussion in 'ASP General' started by Jeff, Dec 15, 2005.

  1. Jeff

    Jeff Guest

    Can someone help me here. I am getting an error that I haven't seen before.

    <%
    SET teams1 = Conn.Execute("SELECT * FROM teams WHERE team_initials = '" &
    var1 & "'")
    SET teams_wins = Conn.Execute("SELECT count(username) as wins1 FROM
    all_matches WHERE tour = " & var2 & " AND round = " & var3 & " AND team1 =
    '" & var1 & "' AND outcome = 'Win' and extra_match = 0")
    var4 = teams_wins.fields.item("wins1").value

    the error is:

    Microsoft JET Database Engine error '80040e10'
    No value given for one or more required parameters.

    /logo/team_stats444.asp, line 96



    I have checked, all the fields contain values. I am not sure if I have
    written the script wrong, or if something else is the problem.

    Bam
    Jeff, Dec 15, 2005
    #1
    1. Advertising

  2. Jeff wrote:
    > Can someone help me here. I am getting an error that I haven't seen
    > before.
    >
    > <%
    > SET teams1 = Conn.Execute("SELECT * FROM teams WHERE team_initials =
    > '" & var1 & "'")
    > SET teams_wins = Conn.Execute("SELECT count(username) as wins1 FROM
    > all_matches WHERE tour = " & var2 & " AND round = " & var3 & " AND
    > team1 = '" & var1 & "' AND outcome = 'Win' and extra_match = 0")
    > var4 = teams_wins.fields.item("wins1").value
    >
    > the error is:
    >
    > Microsoft JET Database Engine error '80040e10'
    > No value given for one or more required parameters.
    >
    > /logo/team_stats444.asp, line 96
    >
    >
    >
    > I have checked, all the fields contain values. I am not sure if I have
    > written the script wrong, or if something else is the problem.
    >
    > Bam

    You cannot debug a sql statement without knowing what it is. Assign the
    result of your concatenation to a variable, Response.Write the variable and
    look at it in the browser. If you've built the statment correctly, you
    should be able to copy the statement from the browser window, open your
    database in Access, create a new query in Design View using the Query
    Builder, switch to SQL View, paste in the statement from the browser window
    and run it without modification. If it fails, you will likely get a more
    meaningful error message. If this does not help you solve your problem, get
    back to us.

    Again, the vast majority of this type of error can be avoided by using
    parameters:
    http://groups-beta.google.com/group/microsoft.public.inetserver.asp.db/msg/72e36562fee7804e

    http://groups.google.com/groups?hl=...=1&selm=

    http://groups.google.com/groups?hl=...=1&selm=ukS$6S$

    http://www.google.com/groups?selm=&oe=UTF-8&output=gplain

    http://www.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
    Bob Barrows [MVP], Dec 15, 2005
    #2
    1. Advertising

  3. Jeff

    Jeff Guest

    nevermind, i did a response.write and found the problem
    thanks


    "Jeff" <> wrote in message
    news:...
    > Can someone help me here. I am getting an error that I haven't seen
    > before.
    >
    > <%
    > SET teams1 = Conn.Execute("SELECT * FROM teams WHERE team_initials = '" &
    > var1 & "'")
    > SET teams_wins = Conn.Execute("SELECT count(username) as wins1 FROM
    > all_matches WHERE tour = " & var2 & " AND round = " & var3 & " AND team1 =
    > '" & var1 & "' AND outcome = 'Win' and extra_match = 0")
    > var4 = teams_wins.fields.item("wins1").value
    >
    > the error is:
    >
    > Microsoft JET Database Engine error '80040e10'
    > No value given for one or more required parameters.
    >
    > /logo/team_stats444.asp, line 96
    >
    >
    >
    > I have checked, all the fields contain values. I am not sure if I have
    > written the script wrong, or if something else is the problem.
    >
    > Bam
    >
    >
    Jeff, Dec 15, 2005
    #3
  4. Jeff

    Jeff Guest

    thanks Bob, you must have been posting as I was. I did the response write,
    and found the error.
    Thanks once again
    Jeff
    "Bob Barrows [MVP]" <> wrote in message
    news:...
    > Jeff wrote:
    >> Can someone help me here. I am getting an error that I haven't seen
    >> before.
    >>
    >> <%
    >> SET teams1 = Conn.Execute("SELECT * FROM teams WHERE team_initials =
    >> '" & var1 & "'")
    >> SET teams_wins = Conn.Execute("SELECT count(username) as wins1 FROM
    >> all_matches WHERE tour = " & var2 & " AND round = " & var3 & " AND
    >> team1 = '" & var1 & "' AND outcome = 'Win' and extra_match = 0")
    >> var4 = teams_wins.fields.item("wins1").value
    >>
    >> the error is:
    >>
    >> Microsoft JET Database Engine error '80040e10'
    >> No value given for one or more required parameters.
    >>
    >> /logo/team_stats444.asp, line 96
    >>
    >>
    >>
    >> I have checked, all the fields contain values. I am not sure if I have
    >> written the script wrong, or if something else is the problem.
    >>
    >> Bam

    > You cannot debug a sql statement without knowing what it is. Assign the
    > result of your concatenation to a variable, Response.Write the variable
    > and
    > look at it in the browser. If you've built the statment correctly, you
    > should be able to copy the statement from the browser window, open your
    > database in Access, create a new query in Design View using the Query
    > Builder, switch to SQL View, paste in the statement from the browser
    > window
    > and run it without modification. If it fails, you will likely get a more
    > meaningful error message. If this does not help you solve your problem,
    > get
    > back to us.
    >
    > Again, the vast majority of this type of error can be avoided by using
    > parameters:
    > http://groups-beta.google.com/group/microsoft.public.inetserver.asp.db/msg/72e36562fee7804e
    >
    > http://groups.google.com/groups?hl=...=1&selm=
    >
    > http://groups.google.com/groups?hl=...=1&selm=ukS$6S$
    >
    > http://www.google.com/groups?selm=&oe=UTF-8&output=gplain
    >
    > http://www.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=
    > --
    > Microsoft MVP -- ASP/ASP.NET
    > Please reply to the newsgroup. The email account listed in my From
    > header is my spam trap, so I don't check it very often. You will get a
    > quicker response by posting to the newsgroup.
    >
    >
    Jeff, Dec 15, 2005
    #4
    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. Mark Goldin

    Errors, errors, errors

    Mark Goldin, Jan 17, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    942
    Mark Goldin
    Jan 17, 2004
  2. SenthilVel
    Replies:
    0
    Views:
    940
    SenthilVel
    Jun 7, 2006
  3. George1776

    Out-of-memory errors and caching errors.

    George1776, Aug 28, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    1,290
    George1776
    Sep 14, 2006
  4. Lance Wynn
    Replies:
    1
    Views:
    1,838
    Lance Wynn
    Feb 3, 2008
  5. yawnmoth
    Replies:
    97
    Views:
    4,704
    Bent C Dalager
    Feb 27, 2009
Loading...

Share This Page