Thanks- that was very easy.  I knew I was trying to make it more difficult
then it was!

-----Original Message-----
From: sebastian palmigiani [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 10, 2002 1:44 PM
To: CF-Talk
Subject: Re: datatypes in select boxes


I am not sure if I have grasped your problem but....

What I do in this situation is this

<OPTION VALUE="#TchrID#,#GradeTaught#">#TCHRNAME# #GradeTaught#

make the option value into a list

then at the stored procedure I would

<cfset VARIABLE.TchrID = ListFirst(FORM.TchGrade)>
<cfset VARIABLE.GradeTaught = ListLast(FORM.TchGrade)>

Then pass each individual VARIABLE.xxx to the stored procedure

Sebastian



on 4/10/02 9:11 AM, Janine Jakim at [EMAIL PROTECTED] wrote:

> I have a select box that shows teachers and the grade they teach (some
teach
> several grades). This selection is sent to a stored procedure. I want my
> select box to pull up the teacher with the students by grade so I set it
up
> like this
> 
> <SELECT NAME="TchGrade" SIZE="9" TABINDEX size="1" style="width:190px"
> Multiple>
> <OPTION SELECTED VALUE="">
> <CFOUTPUT QUERY="TchrByGrade">
> <OPTION VALUE="#TchrID##GradeTaught#">#TCHRNAME# #GradeTaught#
> </CFOUTPUT>
> </SELECT>
> Simple eeeh
> Now this would work great IF TchrID and GradeTaught were both varchar
> fields, but TchrID is an integer and GradeTaught is a varchar.  So of
course
> I am getting errors about the datatype being wrong and or an error trying
to
> convert it.
> So I then moved the option value into my query ((TchrID + GradeTaught) AS
> TcherGradeTaught)
> And used that <OPTION VALUE="#TcherGradeTaught#">#TCHRNAME# #GradeTaught#
> Although this is a good thing to do it of course doesn't fix my problem.
> 
> Any way around this?
> Thanks,
> J
> 

______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to