RE: Why is there query.recordcount with non-SELECT queries?

2006-04-24 Thread Munson, Jacob
Oh, sweet! That is a better way to do it. I guess as long as servicefactory doesn't go away, this should work with furture versions. I'd hate to see Adobe drop that, because I know a lot of people use it. -Original Message- From: Denny Valliant [mailto:[EMAIL PROTECTED] Sent:

RE: Why is there query.recordcount with non-SELECT queries?

2006-04-24 Thread Russ Michaels
is there query.recordcount with non-SELECT queries? Oh, sweet! That is a better way to do it. I guess as long as servicefactory doesn't go away, this should work with furture versions. I'd hate to see Adobe drop that, because I know a lot of people use it. -Original Message- From: Denny

RE: Why is there query.recordcount with non-SELECT queries?

2006-04-24 Thread Munson, Jacob
Oh, you can't access the servicefactory from a shared host? I guess that makes sense, there's a lot of stuff in there that would affect all customers on the box. -Original Message- From: Russ Michaels [mailto:[EMAIL PROTECTED] Sent: Monday, April 24, 2006 3:53 PM handy yes, its

Re: Why is there query.recordcount with non-SELECT queries?

2006-04-21 Thread Qasim Rasheed
Jacob, I am glad that you found it useful and managed to translate it for SQL server as well. I also saw you blog post about this technique. Thanks Qasim On 4/20/06, Munson, Jacob [EMAIL PROTECTED] wrote: I got this working for MS SQL, here's the code: cfscript //connection url connURL

Re: Why is there query.recordcount with non-SELECT queries?

2006-04-21 Thread Denny Valliant
It might b e worth noting that you can use undocumented don't use these and expect them to work over time type functions to use an existing datasource, so you don't need to save your db user pass hardly. Something like: daFactory = CreateObject (Java,

Re: Why is there query.recordcount with non-SELECT queries?

2006-04-20 Thread Claude Schneegans
Well I have been using JDBC Statement call from CF and it will return you number of records effected for updated, inserts or deletes. Really? Then CF has no excuse anymore. -- ___ REUSE CODE! Use custom tags; See

RE: Why is there query.recordcount with non-SELECT queries?

2006-04-20 Thread Munson, Jacob
How do you do that? -Original Message- From: Qasim Rasheed [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 19, 2006 6:40 PM Well I have been using JDBC Statement call from CF and it will return you number of records effected for updated, inserts or deletes. -

Re: Why is there query.recordcount with non-SELECT queries?

2006-04-20 Thread Qasim Rasheed
Jacob, Here is an example implementation for Oracle. You can definitely modify it for any other database. cfscript //connection url connURL = jdbc:macromedia:oracle://..; jclass = createobject('java','java.lang.Class'); jclass.forName('macromedia.jdbc.oracle.OracleDriver');

Re: Why is there query.recordcount with non-SELECT queries?

2006-04-20 Thread Sam Farmer
On 4/18/06, Mike Klostermeyer [EMAIL PROTECTED] wrote: I wouldn't say that. Sometimes it is helpful to know how many records were updated or deleted without having to do a select query beforehand. Is there a Java service factory way of getting at this information? CF7 has a result attribute

Re: Why is there query.recordcount with non-SELECT queries?

2006-04-20 Thread Qasim Rasheed
Sam, AFAIK the result attribute doesn't return records affected from insert/delete/updates. Please correct me if I am wrong. Thanks Qasim On 4/20/06, Sam Farmer [EMAIL PROTECTED] wrote: On 4/18/06, Mike Klostermeyer [EMAIL PROTECTED] wrote: I wouldn't say that. Sometimes it is helpful to

RE: Why is there query.recordcount with non-SELECT queries?

2006-04-20 Thread Munson, Jacob
AFAIK the result attribute doesn't return records affected from insert/delete/updates. Please correct me if I am wrong. You are right, I just tried it and it says recordcount: 0, and the only other data returned is cached, executiontime, and sql code. --- This transmission may

RE: Why is there query.recordcount with non-SELECT queries?

2006-04-20 Thread Munson, Jacob
I got this working for MS SQL, here's the code: cfscript //connection url connURL = jdbc:macromedia:sqlserver://server:1433; jclass = createobject('java','java.lang.Class'); jclass.forName('macromedia.jdbc.sqlserver.SQLServerDriver'); driverManager = CreateObject('java',

RE: Why is there query.recordcount with non-SELECT queries?

2006-04-19 Thread Nashir Sunderji
You log ingo to 'search' and type in search by name the letters naf and you should be able to find him Customer service -Original Message- From: Pete Ruckelshaus [mailto:[EMAIL PROTECTED] Sent: 18 April 2006 16:16 To: CF-Talk Subject: Why is there query.recordcount with non-SELECT

RE: Why is there query.recordcount with non-SELECT queries?

2006-04-19 Thread Russ Michaels
-Original Message- From: Nashir Sunderji [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Date: Wed, 19 Apr 2006 08:25:58 +0100 Subject: RE: Why is there query.recordcount with non-SELECT queries? You log ingo to 'search' and type in search by name the letters naf and you should

Re: Why is there query.recordcount with non-SELECT queries?

2006-04-19 Thread Nick Tong - TalkWebSolutions.co.uk
it and see if its there. Russ -Original Message- From: Nashir Sunderji [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Date: Wed, 19 Apr 2006 08:25:58 +0100 Subject: RE: Why is there query.recordcount with non-SELECT queries? You log ingo to 'search' and type

Re: Why is there query.recordcount with non-SELECT queries?

2006-04-19 Thread Jochem van Dieten
Russ Michaels wrote: No, only selects return a recordcount. Although SQL does return a message about how many records are updated Maybe some implementations update the diagnostic area with that information, but returning a count of the number of records affected is not part of the SQL

Re: Why is there query.recordcount with non-SELECT queries?

2006-04-19 Thread Dave Carabetta
On 4/19/06, Jochem van Dieten [EMAIL PROTECTED] wrote: Russ Michaels wrote: No, only selects return a recordcount. Although SQL does return a message about how many records are updated Maybe some implementations update the diagnostic area with that information, but returning a count of

Re: Why is there query.recordcount with non-SELECT queries?

2006-04-19 Thread Jochem van Dieten
Dave Carabetta wrote: On 4/19/06, Jochem van Dieten [EMAIL PROTECTED] wrote: Maybe some implementations update the diagnostic area with that information, but returning a count of the number of records affected is not part of the SQL specification. More importantly, it is only part of JDBC 3

RE: Why is there query.recordcount with non-SELECT queries?

2006-04-19 Thread Ben Nadel
:[EMAIL PROTECTED] Sent: Wednesday, April 19, 2006 1:51 PM To: CF-Talk Subject: Re: Why is there query.recordcount with non-SELECT queries? On 4/19/06, Jochem van Dieten [EMAIL PROTECTED] wrote: Russ Michaels wrote: No, only selects return a recordcount. Although SQL does return a message

Re: Why is there query.recordcount with non-SELECT queries?

2006-04-19 Thread Ken Ferguson
is there query.recordcount with non-SELECT queries? On 4/19/06, Jochem van Dieten [EMAIL PROTECTED] wrote: Russ Michaels wrote: No, only selects return a recordcount. Although SQL does return a message about how many records are updated Maybe some implementations update

Re: Why is there query.recordcount with non-SELECT queries?

2006-04-19 Thread Claude Schneegans
are ya'll just debating usefullness? Or is the return of the recordcount actually creating a problem somewhere? I think the first two messages in the thread are quite clear: 1. It would be useful that a query returns the number of updated record in an UPDATE in query.recordCount 2. The qurery

Re: Why is there query.recordcount with non-SELECT queries?

2006-04-19 Thread Rob Wilkerson
That was my concensus early on. Seems like it would be a hard sell to argue against either of those statements. -- Rob Wilkerson ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238174 Archives:

RE: Why is there query.recordcount with non-SELECT queries?

2006-04-19 Thread Ben Nadel
:[EMAIL PROTECTED] Sent: Wednesday, April 19, 2006 2:13 PM To: CF-Talk Subject: Re: Why is there query.recordcount with non-SELECT queries? are ya'll just debating usefullness? Or is the return of the recordcount actually creating a problem somewhere? I think the first two messages in the thread

RE: Why is there query.recordcount with non-SELECT queries?

2006-04-19 Thread Munson, Jacob
it might be worth looking at whats returned in the metadata (getMetaData) and the query result structure I did some testing, and CF doesn't appear to treat update queries the same as select queries. Neither cfdump nor getMetaData work with an update query, in fact CF doesn't even recognize the

Re: Why is there query.recordcount with non-SELECT queries?

2006-04-19 Thread Claude Schneegans
CF shouldn't return a RecordCount on non-selecting queries. Well, the best would be it returns a sensible value. If it cannot, better return nothing, AND document it. -- ___ REUSE CODE! Use custom tags; See

Re: Why is there query.recordcount with non-SELECT queries?

2006-04-19 Thread Claude Schneegans
CF doesn't appear to treat update queries the same as select queries I think a good reason is that a SELECT SQL query returns a dataset, an INSERT, UPDATE or DELETE does not. What we call a QUERY in CF is actually a dataset, the SELECT, UPDATE or other is not a query, it is an SQL statement.

RE: Why is there query.recordcount with non-SELECT queries?

2006-04-19 Thread Ben Nadel
I suppose one solutions, while it is a bit more work would be to have osmething like: cfquery ... DECLARE @record_count INT; SET @record_count = ISNULL( ( SELECT COUNT(*) AS record_count FROM [TABLE] WHERE where clauses ), 0 ); !--- Now run update --- UPDATE. WHERE..

RE: Why is there query.recordcount with non-SELECT queries?

2006-04-19 Thread Munson, Jacob
This would work, as long as you're using MS SQL. -Original Message- From: Ben Nadel [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 19, 2006 1:26 PM I suppose one solutions, while it is a bit more work would be to have osmething like: cfquery ... DECLARE @record_count INT;

Re: Why is there query.recordcount with non-SELECT queries?

2006-04-19 Thread Claude Schneegans
Not sure on which kind of database it will work. All I know is that it wont work with Access database. Another way to get the same result would be to store a date time value in the same query as the INSERT or UPDATE, then count them in another query. If the field is indexed, it should take a

Re: Why is there query.recordcount with non-SELECT queries?

2006-04-19 Thread Qasim Rasheed
Well I have been using JDBC Statement call from CF and it will return you number of records effected for updated, inserts or deletes. Thanks Qasim On 4/19/06, Claude Schneegans [EMAIL PROTECTED] wrote: Not sure on which kind of database it will work. All I know is that it wont work with

Why is there query.recordcount with non-SELECT queries?

2006-04-18 Thread Pete Ruckelshaus
Should queries that do an update return a queryname.recordcount variable? I'm trying to determine how many records get changed during an update statement. Pete ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238007

Re: Why is there query.recordcount with non-SELECT queries?

2006-04-18 Thread Rob Wilkerson
As I recall, the value gets returned, but always says 0. It's not useful for anything other than select queries. On 4/18/06, Pete Ruckelshaus [EMAIL PROTECTED] wrote: Should queries that do an update return a queryname.recordcount variable? I'm trying to determine how many records get changed

RE: Why is there query.recordcount with non-SELECT queries?

2006-04-18 Thread Mike Klostermeyer
: Tuesday, April 18, 2006 10:22 AM To: CF-Talk Subject: Re: Why is there query.recordcount with non-SELECT queries? As I recall, the value gets returned, but always says 0. It's not useful for anything other than select queries. On 4/18/06, Pete Ruckelshaus [EMAIL PROTECTED] wrote: Should queries

Re: Why is there query.recordcount with non-SELECT queries?

2006-04-18 Thread Rob Wilkerson
having to do a select query beforehand. Is there a Java service factory way of getting at this information? Mike -Original Message- From: Rob Wilkerson [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 18, 2006 10:22 AM To: CF-Talk Subject: Re: Why is there query.recordcount with non

RE: Why is there query.recordcount with non-SELECT queries?

2006-04-18 Thread Ben Nadel
speed. -Original Message- From: Rob Wilkerson [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 18, 2006 11:32 AM To: CF-Talk Subject: Re: Why is there query.recordcount with non-SELECT queries? Sorry, I should have been more clear. I meant that the return value (queryname.recordCount

Re: Why is there query.recordcount with non-SELECT queries?

2006-04-18 Thread Ryan Guill
is there query.recordcount with non-SELECT queries? As I recall, the value gets returned, but always says 0. It's not useful for anything other than select queries. On 4/18/06, Pete Ruckelshaus [EMAIL PROTECTED] wrote: Should queries that do an update return a queryname.recordcount

RE: Why is there query.recordcount with non-SELECT queries?

2006-04-18 Thread Ben Nadel
with non-SELECT queries? Note on the minor comment: not all db's will allow this. On 4/18/06, Ben Nadel [EMAIL PROTECTED] wrote: Minor comment, but I often will run an Update and a select in the same CFQuery statement... This will return rows/recordcount (potentially). ColdFusion doesn't know