Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old December 15th, 2005, 04:05 PM
Jeff
Guest
 
Posts: n/a
Default Script errors

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


  #2  
Old December 15th, 2005, 04:05 PM
Jeff
Guest
 
Posts: n/a
Default Re: Script errors

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


"Jeff" <gig_bam@adelphia.net> wrote in message
news:mpOdneF3JaElEzzeRVn-rw@adelphia.com...[color=blue]
> 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
>
>[/color]


  #3  
Old December 15th, 2005, 04:05 PM
Bob Barrows [MVP]
Guest
 
Posts: n/a
Default Re: Script errors

Jeff wrote:[color=blue]
> 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[/color]
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/...e36562fee7804e

http://groups.google.com/groups?hl=e...tngp13.phx.gbl

http://groups.google.com/groups?hl=e...TNGP11.phx.gbl

http://www.google.com/groups?selm=eE...&output=gplain

http://www.google.com/groups?hl=en&l...TNGP12.phx.gbl
--
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.


  #4  
Old December 15th, 2005, 06:25 PM
Jeff
Guest
 
Posts: n/a
Default Re: Script errors

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]" <reb01501@NOyahoo.SPAMcom> wrote in message
news:eaP2L8YAGHA.912@TK2MSFTNGP11.phx.gbl...[color=blue]
> Jeff wrote:[color=green]
>> 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[/color]
> 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/...e36562fee7804e
>
> http://groups.google.com/groups?hl=e...tngp13.phx.gbl
>
> http://groups.google.com/groups?hl=e...TNGP11.phx.gbl
>
> http://www.google.com/groups?selm=eE...&output=gplain
>
> http://www.google.com/groups?hl=en&l...TNGP12.phx.gbl
> --
> 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.
>
>[/color]


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles