Yer, thought of that and it works, thanks.


Still very annoying though, wasted a few hours trying to track that down
this morning.

-----Original Message-----
From: Ryan Emerle [mailto:[EMAIL PROTECTED]
Sent: 03 December 2003 15:54
To: CF-Talk
Subject: RE: Query of Queries issue with 6.1


I've had this lovely issue come up before.  Gotta love the fact
that the columns are typed, but you have no control over it (AFAIK).
What i had to do was insert a dummy row at the top of the query with the
problematic field set as a string.  This causes the column typing
algorithm to set the column as varchar.


Here's a code example
<cfset queryAddRow(myQuery,1)>
<cfset querySetCell(myQuery,"problem_column","dummy_text")>


HTH
-Ryan

-----Original Message-----
From: Craig Dudley [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 10:29 AM
To: CF-Talk
Subject: Query of Queries issue with 6.1

Afternoon

I've just updated a customer site to 6.1 from 5.0 and am getting
a very
strange error with a QoQ,

Basically, I'm creating a query object from a string that's
being posted
to this page, no problems here, I have a nice query object that
works
fine, mostly.

But when I try to do comparisons with this query and another I'm
getting
'Unsupported type comparison.' I've narrowed it down to one
field,
namely 'pin' this field is 90% of the time always integers, but
can
contain characters as well. I therefore have to do the
comparisons with
quotes eg pin = '#pin#', not pin = #pin#

This is the issue, CFMX seems to be assigning a datatype of int
or
numeric when I'm creating the query with
QueryNew("pin,other,fields"),
even though it won't let you specifiy what a column is. Then pin
=
'#pin#' throws the unsupported datatype error (using
cfqueryparam
produces the same results btw)

Of course if I remove the quotes it works until a pin which
contains
letters arrives. Damned if I do, damned if I don't and very
unhappy
either way.

Has anoyone seen this or got a work around?

Craig Dudley
Senior Developer
Netstep Corporate Communications Ltd
Direct Line: +44(0) 1422 319712
Phone: +44(0) 1422 200308
Fax: +44(0) 1422 200306
e-mail: [EMAIL PROTECTED]
MS Messenger: [EMAIL PROTECTED]
www: www.netstep.co.uk
  _____
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to