Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select Statement based on CFFORM Error

Status
Not open for further replies.

theif68

Technical User
Apr 3, 2005
39
US
First page code

<CFFORM format="Flash" width="500" Action="Results.cfm" Method="Post"><br>

<p> Enter Player Name
<CFinput type="Text" name="Playername">
</p>
<p>
<CFinput type="submit" name="Submit" value="Submit">
</p>
</CFFORM>

Second page code
<cfquery name="Score" datasource="Nascar">
SELECT Week1Results.*
FROM Week1Results
WHERE PlayerName = #form.PlayerName#
</cfquery>


<table>
<td class="head1"><b>Week - 1</b><br><hr></td>
</table><table>
<td class="head1" width=50><b>Player <td class="head1" width=125><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Driver<td class="head1"><b>Weekly Points</td></table>
<table>
<cfoutput query="Score">
<TR BGCOLOR="###IIF(score.currentrow MOD 2, DE('FFFFE1'),
DE('FFFFCC'))#">
<td width=75>#PlayerName# <td width=150">#DriverName# <td> #SumOfWeeklyPoints# <br><tr>
</cfoutput>
</tr></td></table>

 
ACTUALL ERROR




The following information is meant for the website developer for debugging purposes.

Error Occurred While Processing Request
Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.

The error occurred in C:\Inetpub\ line 58

56 : SELECT Week1Results.*
57 : FROM Week1Results
58 : WHERE PlayerName = #form.PlayerName#
59 : </cfquery>
60 :



--------------------------------------------------------------------------------

SQL SELECT Week1Results.* FROM Week1Results WHERE PlayerName = Angie
DATASOURCE Nascar
VENDORERRORCODE -3010
SQLSTATE 07002

Resources:
Check the ColdFusion documentation to verify that you are using the correct syntax.
Search the Knowledge Base to find a solution to your problem.


Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Remote Address 192.168.1.1
Referrer
Date/Time 08-Jan-06 08:29 PM

Stack Trace (click to expand)
 
You need to put single quotes around #form.PlayerName# in your query.


Hope This Helps!

ECAR
ECAR Technologies

"My work is a game, a very serious game." - M.C. Escher
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top