Script errors

J

Jeff

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
 
B

Bob Barrows [MVP]

Jeff said:
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&[email protected]

http://groups.google.com/groups?hl=...=1&[email protected]

http://www.google.com/[email protected]&oe=UTF-8&output=gplain

http://www.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&[email protected]
 
J

Jeff

thanks Bob, you must have been posting as I was. I did the response write,
and found the error.
Thanks once again
Jeff
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top