Too few parameters. Expected 1.

ready4god2513

New member
Local time
Today, 08:09
Joined
Jun 8, 2007
Messages
2
I am using Access to run my database. I am using Coldfusion to power the website. What I need to do is be able to update some fields. The problems first start in the select query, however.

There are two different forms. One that is a select box that has the options of "Buyers", "Sellers", "Newsletter". Onchange the select box (named "page"). When I submit that box it needs to populate a second box. That box is populated with the information found in the table that is selected in the first box.

Here is the query that it is using to get the information to populate:

SELECT RE.Information, RE.Page
FROM RE
WHERE (((RE.Page)="#form.page#"));

Does anyone see a problem?

Here's the result:

] Too few parameters. Expected 1.

The error occurred in D:\Inetpub\aheart4home\admin\editpages.cfm: line 10

8 : SELECT RE.Information, RE.Page
9 : FROM RE
10 : WHERE (((RE.Page)="#form.page#"));
11 : </cfquery>
12 : </cfif>


Thanks,
Brandon
 
Ready,

WHERE (((RE.Page)="#form.page#"));

That means a whole of different things:

WHERE RE.Page = " & form.page & ";" <-- form.page is a number

WHERE RE.Page = '" & form.page & "';" <-- form.page is a string

WHERE RE.Page = #" & form.page & "#;" <-- form.page is a date

BUT, what is form.page?

If it is a textbox on your form, the traditional reference is --> Me.Page

Wayne
 
form.page could be: Buyers, Sellers, or Newsletter. So how should I do that?
 

Users who are viewing this thread

Back
Top Bottom