What happens if you use this code in query number 2? If it works, you might
have to explicitly call classID in a scoped variable ("variables.classID").
Maybe there's a conflict with classID in another scope?

> <CFQUERY name="InsertWaitingStudent" datasource="SMC">
>  UPDATE ClassRegistration
>  SET 
>   ClassSchedID=#getWaitingStudent.WaitList#,
>   WaitList=NULL,
>   ModifiedDate=#Now()#
>  WHERE RegistrationID='#RegID#'
> </CFQUERY>

Also, be sure to look at the source code of the CF error, just to be sure
there are no meta characters that the browser is hiding (in the SQL
statement).

Good luck,
Jamie



-----Original Message-----
From: David Clay [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 01, 2001 4:28 PM
To: Jamie Jackson
Subject: Re: CFSET / UPDATE SQL


I get he correct answer.  It, for some reason, is not putting the value in
the UPDATE query.

Dave Clay
Internet Facilitator
Trus Joist, A Weyerhaeuser Business
5995 Greenwood Plaza Blvd, Suite 100
Greenwood Village, CO 80111
303.770.8506

>>> [EMAIL PROTECTED] 06/01/01 10:21AM >>>
See below:

On Thu, 31 May 2001 16:12:03 -0600, "David Clay" <[EMAIL PROTECTED]>
wrote:

>Can anyone tell me why the #ClassID# in the UPDATE Query is always coming
up as a blank space, thus producing an error.
>
>Code below:
>
> <CFQUERY name="getWaitingStudent" datasource="SMC">
> SELECT ClassSchedID, InputDate, WaitList, RegistrationID
> FROM ClassRegistration
> WHERE InputDate  (SELECT MIN(InputDate)
>  FROM ClassRegistration
>  WHERE ClassSchedID=99999)
> </CFQUERY>

<!--- What do you get if you put this in right here? --->
<cfoutput>getWaitingStudent.WaitList='#getWaitingStudent.WaitList#'</cfoutpu
t>
<cfabort>

> <CFSET ClassID=#getWaitingStudent.WaitList#>
> <CFSET RegID='#getWaitingStudent.RegistrationID#'> 
>
> <CFQUERY name="InsertWaitingStudent" datasource="SMC">
>  UPDATE ClassRegistration
>  SET 
>   ClassSchedID=#ClassID#,
>   WaitList=NULL,
>   ModifiedDate=#Now()#
>  WHERE RegistrationID='#RegID#'
> </CFQUERY>
>
>Dave Clay
>Internet Facilitator
>Trus Joist, A Weyerhaeuser Business
>5995 Greenwood Plaza Blvd, Suite 100
>Greenwood Village, CO 80111
>303.770.8506
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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