What happens when you dump OpenedUpSeats and/or isquery(OpenedUpSeats) ?
On Thu, May 19, 2011 at 6:57 AM, Phillip Vector
vec...@mostdeadlygame.comwrote:
cfquery name=OpenedUpSeats dbtype=ODBC datasource=TrainingBE
Select *
from OpenedUpSeatsView
where account='cfset
What happens when you dump OpenedUpSeats and/or isquery(OpenedUpSeats) ?
Variable OPENEDUPSEATS is undefined.
But it IS defined.. *pulls hair*
~|
Order the Adobe Coldfusion Anthology now!
On 5/19/2011 7:57 AM, Phillip Vector wrote:
cfquery name=OpenedUpSeats dbtype=ODBC datasource=TrainingBE
Select *
from OpenedUpSeatsView
where account='cfset zz=writeoutput(session.account)'
/cfquery
cfif OpenedUpSeats.RecordCount
First of all.. This isn't my code, so
Can we see more of the code? There's obviously something funny here
and we're not able to see it.
On Thu, May 19, 2011 at 7:02 AM, Phillip Vector
vec...@mostdeadlygame.com wrote:
What happens when you dump OpenedUpSeats and/or isquery(OpenedUpSeats) ?
Variable OPENEDUPSEATS is undefined.
...@nc.rr.com]
Sent: Thursday, May 19, 2011 7:26 AM
To: cf-talk
Subject: Re: Recordcount not working
On 5/19/2011 7:57 AM, Phillip Vector wrote:
cfquery name=OpenedUpSeats dbtype=ODBC datasource=TrainingBE
Select *
from OpenedUpSeatsView
where account='cfset zz
On 5/19/2011 7:57 AM, Phillip Vector wrote:
Run it without the Where clause in the SQL and see what happens.
cfquery name=OpenedUpSeats dbtype=ODBC datasource=TrainingBE
Select * from OpenedUpSeatsView
/cfquery
cfdump var=#OpenedUpSeats# abort
gets me
Variable OPENEDUPSEATS is undefined.
Can we see more of the code? There's obviously something funny here
and we're not able to see it.
cfif (not isdefined(session.stack))
or (not isdefined(session.stackT))
or (not listlen(session.stack) is listlen(session.stackT))
or (listlen(session.stack) gt 40)
The code looks like this: cfdump var=#OpenedUpSeats# abort ?
I have never seen code like this ever or that writeoutput() above..
have you tried just
cfdump var=#OpenedUpSeats# /
cfabort /
On Thu, May 19, 2011 at 8:29 AM, Phillip Vector
vec...@mostdeadlygame.com wrote:
cfdump
The code looks like this: cfdump var=#OpenedUpSeats# abort ?
I have never seen code like this ever or that writeoutput() above..
have you tried just
cfdump var=#OpenedUpSeats# /
cfabort /
Same result. It's not the closing of the tags that are messing things up.
cfdump var=#OpenedUpSeats#
ah, added in CF9
http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7ef7.html
Just to rule everything else out..
Go up to the top of the page and JUST put
cfquery name=OpenedUpSeats dbtype=ODBC datasource=TrainingBE
Select * from OpenedUpSeatsView
/cfquery
I've seen this in the past when the request to the DB server just dies for
some reason. The DB server may even process and return the request, so it may
not be obvious. Make sure the DB is giving a response back.
Make sure things like JDBC drivers are up to date.
Wil Genovese
Sr. Web
ah, added in CF9
http://help.adobe.com/en_US/ColdFusion/9.
0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7ef7.html
Just to rule everything else out..
Go up to the top of the page and JUST put
cfquery name=OpenedUpSeats dbtype=ODBC datasource=TrainingBE
Select * from OpenedUpSeatsView
I've seen this in the past when the request to the DB server just
dies for some reason. The DB server may even process and return the
request, so it may not be obvious. Make sure the DB is giving a
response back.
It's able to do tables.. I think that it's because it's a view and not a
Are you under CFMX? Try to remove dbtype=ODBC
This is not valid anymore:
Deprecated the connectString, dbName, dbServer, provider, providerDSN, and sql
attributes, and all values of the dbtype attribute except query. They do not
work, and might cause an error, in releases later than ColdFusion
Are you under CFMX? Try to remove dbtype=ODBC
This is not valid anymore:
Thanks for the tip. Eliminated, but still not working.
I changed the query to point to a table and that works fine. It's looking up a
view that it does this. I can't find anywhere on the interwebs where the is a
...@mostdeadlygame.com
Sent: Thursday, May 19, 2011 10:12 AM
To: cf-talk cf-talk@houseoffusion.com
Subject: Re: Recordcount not working
Are you under CFMX? Try to remove dbtype=ODBC
This is not valid anymore:
Thanks for the tip. Eliminated, but still not working.
I changed the query to point to a table
There is no difference: we successfully query SQL Server views all the
time in several of our apps. Have you checked the permissions? Could it
be that the View doesn't allow the CF service user to SELECT data?
Thanks.. I will check with our DB admin and see.
Phillip..I don't think dbtype is supported for anything other than type:
query any more.
On May 19, 2011 9:34 AM, Phillip Vector vec...@mostdeadlygame.com wrote:
On 5/19/2011 7:57 AM, Phillip Vector wrote:
Run it without the Where clause in the SQL and see what happens.
cfquery
Thanks.. I will check with our DB admin and see.
Turns out, I didn't have permission for the view. I since got it and he
mentioned that the view has no records at all anyway and to just put in a
cfset
OpenedUpSeats.recordcount = 0 to move past it.
So yeah. Still a mystery, but we are moving
This sort of makes sense. The DB rejected the request, somewhere in the
process the JDBC driver returned nothing or NULL or something not exactly
expected and closed the request. CF not getting a result set (not even an empty
results set) didn't set the query result set variable. Thus you
[mailto:vec...@mostdeadlygame.com]
Sent: Thursday, May 19, 2011 8:29 AM
To: cf-talk
Subject: Re: Recordcount not working
Can we see more of the code? There's obviously something funny here
and we're not able to see it.
cfif (not isdefined(session.stack))
or (not isdefined
Wil Genovese wrote:
This sort of makes sense. The DB rejected the request, somewhere in the
process the JDBC driver returned nothing or NULL or something not exactly
expected and closed the request. CF not getting a result set (not even an
empty results set) didn't set the query result
Still stumped on this. It seems that cart_check_item_quantities is somehow
stopping the second recordset from existing. What is going on here?
This:
cfcase value=start
!--- cfobject component=redhotkittiescfcs.cart name=cart /
cfset cart_check_item_quantities = cart.check_item_quantities(
I fail at cfabort. disregard. Sorry.
On Mon, Apr 5, 2010 at 5:56 PM, Matthew Smith chedders...@gmail.com wrote:
Still stumped on this. It seems that cart_check_item_quantities is somehow
stopping the second recordset from existing. What is going on here?
This:
cfcase value=start
!---
cfset total=query_1.recordcount+query_2.recordcount
cfoutput#total#/cfoutput
like that?
Steve
On Tue, Sep 30, 2008 at 3:45 PM, Michael Norton [EMAIL PROTECTED]
wrote:
Greetings,
Is it possible to print the summation of two recordcounts?
Bear with me if I'm being long-winded, but here's
Michael Norton wrote:
Greetings,
Is it possible to print the summation of two recordcounts?
Bear with me if I'm being long-winded, but here's the deal:
Let's say we have two queries, query_1 and query_2.
In the text, I print the number of records by using the following expressions:
On Tue, Sep 30, 2008 at 12:45 PM, Michael Norton
[EMAIL PROTECTED] wrote:
Greetings,
Is it possible to print the summation of two recordcounts?
Bear with me if I'm being long-winded, but here's the deal:
Let's say we have two queries, query_1 and query_2.
In the text, I print the number of
Does this work for you?
cfoutput#query_1.recordcount + query_2.recordcount#/cfouput
Adrian
-Original Message-
From: Michael Norton [mailto:[EMAIL PROTECTED]
Sent: 30 September 2008 20:46
To: cf-talk
Subject: Recordcount Summation of 2 Queries
Greetings,
Is it possible to print the
Woohoo.
Thanks folks.
cfoutput#query_1.recordcount + query_2.recordcount#/cfoutput
Worked perfectly.
~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
Perfectly,
Thanks Adrian
Does this work for you?
cfoutput#query_1.recordcount + query_2.recordcount#/cfouput
Adrian
Greetings,
Is it possible to print the summation of two recordcounts?
Bear with me if I'm being long-winded, but here's the deal:
Let's say we have two queries, query_1 and
SELECT
color
,COUNT(*) AS colorCount
FROM
ShoeTable
GROUP BY
color
M!ke
-Original Message-
From: Les Mizzell [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 21, 2007 11:12 PM
To: CF-Talk
Subject: RecordCount and Sub(?) Counts?
I can think of all kinds of evil use a loop and
Actually, I would try to stay away from count(*) IMO. Count an actual
field.
Nicholas M. Tunney
Blog: http://www.nictunney.com
Adobe Certified Advanced ColdFusion MX7 Developer
Adobe Certified Instructor
Adobe Community Expert
Dawson, Michael wrote:
SELECT
color
,COUNT(*) AS
Actually, I would try to stay away from count(*) IMO. Count an actual
field.
It's one field - shoe_color - so, looking for the count of every color
in there - might be 20 different colors for one style shoe, might be 3.
~|
select count(shoes.shoecolorid) AS colorCount, shoecolor
from shoecolor inner join shoes on shoecolor.shoecolorid = shoes.shoecolorid
group by shoes.shoecolorid, shoecolor.shoecolor
-Original Message-
From: Les Mizzell [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 21, 2007 11:12 PM
To:
Is it possible to get the RecordCount of cf query group?
cfoutput query=getReord group=Name
#Name#, #RecordCount#
cfoutput
#SubName#, #RecordCount#
/cfoutput
/cfoutput
Not automatically the way you are doing it. You can either do something in the
query with group functions, or you can
You could create a counter:
cfset OuterRecordcount=0 /
cfoutput query=getReord group=Name
cfset OuterRecordcount=OuterRecordcount+1 /
#Name#, #RecordCount#
cfoutput
#SubName#, #RecordCount#
/cfoutput
/cfoutput
Baz
-Original Message-
From: j s [mailto:[EMAIL PROTECTED]
Sent:
Baz wrote:
You could create a counter:
That's how I generally do it but if you need the count at the beginning
of the group, or during the output of the group, then your alternative
would be to pass the query to a UDF that you write whose sole purpose is
to determine the count of the current
Alternatively, you could probably get the group count into the query
result set itself by using
SELECT name, subname, count(subname) as subnameCount, cola, colb, colc
from tableName
order by name, subname
group by name, subname, cola, colb, colc
Rick
j s wrote:
Is it possible to get the
You should avoid making queries in a loop. You can usually do the same
with one joined query and cfoutput group= (OR sometimes one query
with a group by clause)
Pascal
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: dinsdag 3 februari 2004 3:36
To: CF-Talk
Here is the query I made, but I get this error:
ODBC Error Code = 37000 (Syntax error or access violation)
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax
near '='.
cfquery name=getclaims datasource=
select claimdetails.claimid, claimdsheader.claimid,
dump the cookie, most likely it's empty
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 03, 2004 11:16 AM
To: CF-Talk
Subject: RE: recordcount in loop
Here is the query I made, but I get this error:
ODBC Error Code = 37000 (Syntax error
Is participantid a string? If it's a number, it should be
claimsheader.participantid = #cookie.theviewuser#
OR even better, use cfqueryparam
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: dinsdag 3 februari 2004 17:16
To: CF-Talk
Subject: RE: recordcount
cfset totalRecords = 0
cfquery name=query1.../cfquery
cfloop query=query1
cfquery query=query2.../cfquery
cfset totalRecords = totalRecords + query2.recordCount
/cfloop
But if all you are trying to do is get the total records, you'd be better
off only using one query, with an inner join.
To do something like this I would use a simple flag.
cfoutput query=myquery' group=outergroup
cfset first= true
cfouput
cfif first
put something here only if it's the first time
cfset first = false
/cfif
/cfoutput
/cfoutput
--
Ian Skinner
Web Programmer
BloodSource
I'm attempting to work-through a recordCount issue
and display information appropriately. When the user
has projects, I'll bulletpoint them and list them
appropriately.
When the user has no projects, I want to display a
message that simply tells them that they have no
projects;
Your output was not entering the loop, when there
were 0 records.. Below is one way of doing it.
cfif qSpecific.recordCount
cfoutput query=qSpecific
li class=bullet
a href=ClientManage/ClientPageView.cfm?clientID=#qUsers.userClient#projI
D=#projectID#Type=2 class=NavyCopy#clientName# -
Thanks for the response, Dave, but that logic doesn't make sense to me,
and I'm hoping you can help explain as to why that should work (I got a
massive puking error when I attempted it, too).
ul
cfoutput query=qSpecific
cfif #qSpecific.RecordCount# GT 0
...
You should put your CFIF
Thanks, Joe!
I now understand what Dave was referring to--the cfif around the
cfoutput.
Thank you!
-Original Message-
From: Joe Eugene [mailto:[EMAIL PROTECTED]]
Sent: Sunday, November 17, 2002 2:29 PM
To: CF-Talk
Subject: RE: RecordCount Question
Your output was not entering
Thanks for the response, Dave, but that logic doesn't
make sense to me, and I'm hoping you can help explain
as to why that should work (I got a massive puking error
when I attempted it, too).
Well, massive puking is always a bad thing.
ul
cfoutput query=qSpecific
cfif
Thanks Tony and the other that tried to help me
out..
Down here is the code that is working ,The only
thing
I did was to change the order of operation in the
cursors I'm using.I wonder why this is the
solution??. Besides although I 'm getting the
data I need at the end the stored
Your problem is that if no records exist then @count NULL, not 0.
Try this.
SELECT @Count=coalesce(COUNT(UserName),0) FROM EkSelfAssRpts
WHERE UserName=@UsernameAux AND
FirstName=@FirstNameAux AND Title=@TitleAux
-Original Message-
From: Mario Martinez R. [mailto:[EMAIL
If it's SQL Server, you can do it like this:
SELECT UserName FROM EkSelfAssRpts
WHERE UserName=@UsernameAux AND
FirstName=@FirstNameAux AND Title=@TitleAux
if @@RowCount = 0
begin
... do your action ...
end
Just keep in mind you have to check @@RowCount (and @@Error)
=@TitleAux
)
begin
your TSQL code
end
Anthony Petruzzi
Webmaster
954-321-4703
[EMAIL PROTECTED]
http://www.sheriff.org
-Original Message-
From: Shawn Grover [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 18, 2002 12:42 PM
To: CF-Talk
Subject: RE: RecordCount is 0 en Stored
Thanks all.
RL Smith
- Original Message -
From: Jochem van Dieten [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Saturday, December 22, 2001 10:05 AM
Subject: Re: RecordCount EQ 0 Problem
Richard L Smith wrote:
Hello,
I am using the following code to display a message
Richard L Smith wrote:
Hello,
I am using the following code to display a message based
on the RecordCount variable's value. Everything works ok
as long as the query returns some records. However when it
is zero no message displays, nothing. I am getting no errors
so i don't think it's
You replaced a query named citysearch with a simple variable called
citysearch. Therefore, citysearch.recordcount ceased to exist. If you
change line 6 to cfset variables.citysearch = #citysearch.recordcount#,
then citysearch.recordcount would still exist.
-Original Message-
From: Lee
Ummm...there's no loop in this code. On line 6 you're setting the variable
citysearch equal to something, and therefore you're blowing away the
resultset, because it's also called citysearch. I'm pretty sure that you
can't have a VARIABLES scope variable and a query resultset that use the
same
Subject: RE: Recordcount/Query Strangeness..
Ummm...there's no loop in this code. On line 6 you're
setting the variable citysearch equal to something, and
therefore you're blowing away the resultset, because it's
also called citysearch. I'm pretty sure that you can't have
a VARIABLES
Maybe it would be a good idea if your count variable (citysearch) had a
different name to your query variable (citysearch)... ;)
I usually name queries q_something etc to avoid this sort of problem.
David Cummins
Lee Fuller wrote:
Ok.. Now I think I'm going nutz. This is completely crazy.
Is it possible to find how many records were updated in cfquery
Were?
You could calculate the number of records that should be updated by
running a preliminary query that selects the same set.
To affirm that the selected set was, in fact updated, you'd have to
test the state
From: "Gena" [EMAIL PROTECTED]
Is it possible to find how many records were updated in cfquery
Were?
You could calculate the number of records that should be updated by
running a preliminary query that selects the same set.
To affirm that the selected set was, in fact
of records in our query.
franz
-Ursprüngliche Nachricht-
Von: pan [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 11. Oktober 2000 09:37
An: CF-Talk
Betreff: Re: recordcount ???
From: "Gena" [EMAIL PROTECTED]
Is it possible to find how many records were updated
Is it possible to find how many records were updated in cfquery
Cheers,
Gennadi
If you mean how many records were returned by a query it is:
cfquery name="myqueryname" etc
..SQL code here...
/cfquery
cfoutput#myqueryname.recordcount#/cfoutput
11, 2000 2:52 PM
To: CF-Talk
Subject: RE: recordcount ???
Is it possible to find how many records were updated in cfquery
Cheers,
Gennadi
If you mean how many records were returned by a query it is:
cfquery name="myqueryname" etc
..SQL code here...
/cfquery
I mean
..SQL code here... = "UPDATE MyTable SET fld = fld+1 where fld = 15"
Gennadi
- Original Message -
From: "Peter Tilbrook" [EMAIL PROTECTED]
To: "CF-Talk" [EMAIL PROTECTED]
Sent: Wednesday, October 11, 2000 2:51 PM
Subject: RE: recordcount ???
I
From: "Gena" [EMAIL PROTECTED]
Is it possible to find how many records were updated in cfquery
Were?
You could calculate the number of records that should be updated by
running a preliminary query that selects the same set.
To affirm that the selected set was, in fact updated, you'd
66 matches
Mail list logo