Copy link to clipboard
Copied
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 |
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Still getting the same error with single quotes and without quotes.
Luis
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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>
Copy link to clipboard
Copied
Are you sure it's not something silly like the wrong field name? It's not case_id perchance, is it?
Copy link to clipboard
Copied
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