Ask a Question related to Coldfusion Database Access, Design and Development.
-
Sir Monkey #1
<cfquery> bug/missing function
Hi All,
In the docs there are a few references to SQLParameters being a member of
the new results structure. The docs say the use is something like:
<cfquery ... results="tempVar">
SQL BLAH
</cfquery>
<cfdump var="#tempVar.SQLParameters#">
It's supposed to hold an "ordered array of cfqueryparam values". What I'm
hoping that means is an array of column types (VarChar, Integer, etc). But for
the life of me, I can't find it. It doesn't show up in the results at all...no
matter what I do.
Am I doing something wrong?
Also, if it is indeed an array of column types...why is it an array? The
column names are passed out as a list, why not pass the column types as a list
as well? It would make life easier if you are trying to do something like
<cfset rstStuff = QueryNew("#rstOriginal.columnList#",
"#rstOriginal.columnTypes#").
TIA,
Chris
Sir Monkey Guest
-
addItem() function missing from List control
I am running Flex 2.0 builder beta and trying to walk through the first of the Flex 1.5 tutorials. The call to the addItem() function below is being... -
Text Missing from cfquery
I have a query which return like 150 records, one of the field contain more than 200 characters. When i try to display it, it only show up part of... -
cfquery errors on Package or function LIST is in an invalid state
I am trying to understand an error I got from my cfquery I created a function using TOAD like: create or replace function list ( field1 number... -
missing guides. missing cursors. missing a good drawing app. Ugh.
I can't see my text cursor. It's invisible. Why? I can't see new guides I drag onto the documents. They are there, I just can't see them. Why? ... -
missing strip function in DB2 8.1 -- remove leading zeros
sujit <yhkumars@yahoo.com> wrote: Where did you have the STRIP function? It didn't exist in version 7.... -
OldCFer #2
Re: <cfquery> bug/missing function
I'm seeing it OK. What it dumps is the sequence 1,2,3 etc along with the value 100,John,Mary etc
OldCFer Guest
-
Jochem van Dieten - TMM #3
Re: <cfquery> bug/missing function
Sir Monkey wrote:
That's not what it means.>
> In the docs there are a few references to SQLParameters being a member of
> the new results structure. The docs say the use is something like:
>
> <cfquery ... results="tempVar">
> SQL BLAH
> </cfquery>
>
> <cfdump var="#tempVar.SQLParameters#">
>
> It's supposed to hold an "ordered array of cfqueryparam values". What I'm
> hoping that means is an array of column types (VarChar, Integer, etc).
If you use cfqueryparam all the variables in the normal debug
output are replaced by placeholders, i.e.:
SELECT * FROM table WHERE field = <cfqueryparam value="xCFx">
will show in the debug output as:
SELECT * FROM table WHERE field = ?
In this case the SQLParameters array will hold the pair
1 xCFx so you know the value that was substituted for the first
parameter.
The information you want is not available from CF. Which does
make a bit of sense, CF itself is typeless.
Jochem
--
Jochem van Dieten
Team Macromedia Volunteer for ColdFusion, beer and fun.
Jochem van Dieten - TMM Guest
-
Sir Monkey #4
Re: <cfquery> bug/missing function
On one hand, I'd agree that leaving the column types out makes sense in a
typeless language...on the other hand SQL is typed (as are recordsets and query
of queries). And when you create a query with QueryNew MM recommends that you
supply a list of column types along with the column names. In a situation
where you creating a forged recordset from a real one, it would be very helpful
to be able to programmatically pull the column types from a query. While CF
makes pretty good guesses most of the time, it interprets one of my columns
that should be a string as a date (the data is in the format ?0000-00000-0000?).
Maybe this will come about in CF 8?
Thanks all!!
Chris
Sir Monkey Guest
-
Jochem van Dieten - TMM #5
Re: <cfquery> bug/missing function
Sir Monkey wrote:
[url]http://www.macromedia.com/go/wish/[/url]>
> Maybe this will come about in CF 8?
Jochem
--
Jochem van Dieten
Team Macromedia Volunteer for ColdFusion, beer and fun.
Jochem van Dieten - TMM Guest



Reply With Quote

