I think you need single quotes around the second value you are setting, and
your where clause looks backwards:

Change: CheckedOutBy=#InSol.Name#
To: CheckedOutBy='#InSol.Name#'

Change: Where '#URL.FileID#' = JobInfoUpload.FileID
To: Where JobInfoUpload.FileID = '#URL.FileID#'
(You may need to lose the single quotes on this one - is it a numeric
field?)

Also, try replacing 'Yes' with True (no quotes)

Bob

-----Original Message-----
From: Chad Gray [mailto:[EMAIL PROTECTED]]
Sent: November 30, 2000 11:52 AM
To: CF-Talk
Subject: UPDATE on a MS Access Database


Im trying a UPDATE on a Access database, and im getting an error


<cfquery name="addtoCJM" datasource="CJM.mdb" dbtype="ODBC">
         UPDATE JobInfoUpload
         SET CheckedOut='Yes',   <cfoutput>CheckedOutBy=#InSol.Name#
         Where '#URL.FileID#' = JobInfoUpload.FileID</cfoutput>
</cfquery>

Everything is spelled correct, but i get an error below.  I have a feeling
it has something to do with my Yes/No Column in the database.



ODBC Error Code = 07001 (Wrong number of parameters)
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
Hint: The cause of this error is usually that your query contains a
reference to a field which does not exist. You should verify that the
fields included in your query exist and that you have specified their names
correctly.
SQL = "UPDATE JobInfoUpload SET CheckedOut='Yes', CheckedOutBy=chad Where
'48' = JobInfoUpload.FileID"
Data Source = "CJM.mdb"
The error occurred while processing an element with a general identifier of
(CFQUERY), occupying document position (25:1) to (25:60) in the template
file D:\Web\Capitol1interface\chad\checkout.cfm.
Date/Time: 11/30/00 11:51:07
Browser: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)
Query String: JobId=11&LoginID=1&FileID=48
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to