Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

"Too few parameters" error one remote server - works fine locally

Explorer ,
Mar 02, 2010 Mar 02, 2010

When testing locally, everything seems to be working fine but I'm getting the following error upon upload to the remote server.

I'm using CF with MS Access and the rest of the my files pulling from other tables in the the same Access db are working fine both locally and remotely.  Any ideas?

thank you,

Luis

[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.

The error occurred in C:\Websites\rc2f7cae\admin\CoolCases\index2.cfm: line 13
11 :   <cflocation url="#MM_failureURL#" addtoken="no">
12 : </cfif>
13 : <cfquery name="rsCoolCases" datasource="#Request.DSN#">
14 : SELECT cases_ID, patient, "online"
15 : FROM coolcases
TOPICS
Database access
754
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 02, 2010 Mar 02, 2010

Double quotes are bad when using odbc.  When you say local testing, do you mean just in access, or with coldfusion?

Also, when you select a constant and don't give it an alias, it won't be accessible later.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 02, 2010 Mar 02, 2010

Still getting the same error with single quotes and without quotes.

Luis

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 02, 2010 Mar 02, 2010

troubleshooting 101, do one thing at a time until it crashes.

Start with

SELECT cases_ID

<---, patient

, "online"
--->

FROM coolcases

if it runs successfully, uncomment the patient line.  If that runs successfully, uncomment the online line.  See what line causes the problem.

The online line with double quotes should always crash.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 02, 2010 Mar 02, 2010

Problem seems to be with cases_id, but still can't identify the exact cause.

cases_id is my primary key in my table and an autonumber, but the entire table is set up exactly like my others that seem to be working fine both locally and remotely.

<cfquery name="rsCool" datasource="#Request.DSN#">
SELECT Cases_ID, Patient, Online
FROM Coolcases
ORDER BY Patient ASC
</cfquery>

When I substitute a * for my db fields, I get a different error related to Cases_ID later in the page from an anchor with a parameter.

<a href="edit.cfm?TypeID=#rsCool.TypeID#">#rsCool.Patient#</a>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 03, 2010 Mar 03, 2010

Are you sure it's not something silly like the wrong field name?  It's not case_id perchance, is it?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 05, 2010 Mar 05, 2010
LATEST

Dan, thanks for your help with this.  Seems to be working well now both locally and remotely.

I just basically started from scratch and recreated the page with new recordset

.  It must've been something simple...perhaps a misspelled field name or poorly defined fieldname.

cheers,

Luis

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources