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: Friday, April 21, 2006 11:57 PM
 
 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,
 coldfusion.server.ServiceFactory);
  conn = daFactory.getDataSourceService
 ().getDatasource(yourDataSourceName).getConnection();
 for the connection and the rest like the rest.
 
 Worth it for me, to use non public api whatnot. Be warned, may not
 work in the future (but there would be something else anyway ;)
 :de
 
 On 4/20/06, Qasim Rasheed [EMAIL PROTECTED] wrote:
 
  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');
  driverManager = CreateObject('java', 'java.sql.DriverManager');
  //user name and passwword
  conn = driverManager.getConnection( connURL, 'USER', 'PASSWORD' );
  sql = delete from atable where id = ?;
  ps = conn.prepareStatement(sql);
  ps.setString(1,'2');
  n = ps.executeUpdate();
  /cfscript
  cfoutput
  Records Affected: #n#
  /cfoutput


[INFO] -- Access Manager:
This transmission may contain information that is privileged, confidential 
and/or exempt from disclosure under applicable law.  If you are not the 
intended recipient, you are hereby notified that any disclosure, copying, 
distribution, or use of the information contained herein (including any 
reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in 
error, please immediately contact the sender and destroy the material in its 
entirety, whether in electronic or hard copy format.  Thank you.   A2



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238559
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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

2006-04-24 Thread Russ Michaels
handy yes, its just a shame its another thing to add to the list of things
that make CF unsuitable for shared hosting.

Russ

-Original Message-
From: Munson, Jacob [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Date: Mon, 24 Apr 2006 14:50:49 -0600
Subject: RE: Why 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 Valliant [mailto:[EMAIL PROTECTED] 
  Sent: Friday, April 21, 2006 11:57 PM
  
  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,
  coldfusion.server.ServiceFactory);
   conn = daFactory.getDataSourceService
  ().getDatasource(yourDataSourceName).getConnection();
  for the connection and the rest like the rest.
  
  Worth it for me, to use non public api whatnot. Be warned, may not
  work in the future (but there would be something else anyway ;)
  :de
  
  On 4/20/06, Qasim Rasheed [EMAIL PROTECTED] wrote:
  
   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');
   driverManager = CreateObject('java', 'java.sql.DriverManager');
   //user name and passwword
   conn = driverManager.getConnection( connURL, 'USER', 'PASSWORD' );
   sql = delete from atable where id = ?;
   ps = conn.prepareStatement(sql);
   ps.setString(1,'2');
   n = ps.executeUpdate();
   /cfscript
   cfoutput
   Records Affected: #n#
   /cfoutput
 
 
 [INFO] -- Access Manager:
 This transmission may contain information that is privileged,
 confidential and/or exempt from disclosure under applicable law.  If
 you are not the intended recipient, you are hereby notified that any
 disclosure, copying, distribution, or use of the information contained
 herein (including any reliance thereon) is STRICTLY PROHIBITED. If you
 received this transmission in error, please immediately contact the
 sender and destroy the material in its entirety, whether in electronic
 or hard copy format.  Thank you.   A2
 
 
 
 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238562
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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 just a shame its another thing to add to the 
 list of things
 that make CF unsuitable for shared hosting.
 
 -Original Message-
 From: Munson, Jacob [EMAIL PROTECTED]
 To: CF-Talk cf-talk@houseoffusion.com
 
  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: Friday, April 21, 2006 11:57 PM
   
   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,
   coldfusion.server.ServiceFactory);
conn = daFactory.getDataSourceService
   ().getDatasource(yourDataSourceName).getConnection();
   for the connection and the rest like the rest.
   
   Worth it for me, to use non public api whatnot. Be warned, may not
   work in the future (but there would be something else anyway ;)

This transmission may contain information that is privileged, confidential 
and/or exempt from disclosure under applicable law. If you are not the intended 
recipient, you are hereby notified that any disclosure, copying, distribution, 
or use of the information contained herein (including any reliance thereon) is 
STRICTLY PROHIBITED. If you received this transmission in error, please 
immediately contact the sender and destroy the material in its entirety, 
whether in electronic or hard copy format. Thank you. A1.



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238568
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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 = jdbc:macromedia:sqlserver://server:1433;
 jclass = createobject('java','java.lang.Class');
 jclass.forName('macromedia.jdbc.sqlserver.SQLServerDriver');
 driverManager = CreateObject('java', 'java.sql.DriverManager');
 //user name and password
 conn = driverManager.getConnection( connURL, 'USER', 'PASSWORD' );
 sql = update budgets.dbo.budgetids set CC = ? where budgetid like ?;
 ps = conn.prepareStatement(sql);
 ps.setString(1,'400');
 ps.setString(2,'B007%');
 n = ps.executeUpdate();
 /cfscript
 cfoutput
 Records Affected: #n#
 /cfoutput

 Notice that I had to give a fully qualified path to the table in my SQL
 statement.

  -Original Message-
  From: Qasim Rasheed [mailto:[EMAIL PROTECTED]
  Sent: Thursday, April 20, 2006 12:06 PM
 
  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');
  driverManager = CreateObject('java', 'java.sql.DriverManager');
  //user name and passwword
  conn = driverManager.getConnection( connURL, 'USER', 'PASSWORD' );
  sql = delete from atable where id = ?;
  ps = conn.prepareStatement(sql);
  ps.setString(1,'2');
  n = ps.executeUpdate();
  /cfscript
  cfoutput
  Records Affected: #n#
  /cfoutput


 [INFO] -- Access Manager:
 This transmission may contain information that is privileged, confidential
 and/or exempt from disclosure under applicable law.  If you are not the
 intended recipient, you are hereby notified that any disclosure, copying,
 distribution, or use of the information contained herein (including any
 reliance thereon) is STRICTLY PROHIBITED. If you received this transmission
 in error, please immediately contact the sender and destroy the material in
 its entirety, whether in electronic or hard copy format.  Thank you.   A2



 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238377
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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,
coldfusion.server.ServiceFactory);
 conn = daFactory.getDataSourceService
().getDatasource(yourDataSourceName).getConnection();
for the connection and the rest like the rest.

Worth it for me, to use non public api whatnot. Be warned, may not
work in the future (but there would be something else anyway ;)
:de

On 4/20/06, Qasim Rasheed [EMAIL PROTECTED] wrote:

 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');
 driverManager = CreateObject('java', 'java.sql.DriverManager');
 //user name and passwword
 conn = driverManager.getConnection( connURL, 'USER', 'PASSWORD' );
 sql = delete from atable where id = ?;
 ps = conn.prepareStatement(sql);
 ps.setString(1,'2');
 n = ps.executeUpdate();
 /cfscript
 cfoutput
 Records Affected: #n#
 /cfoutput

 HTH

 Qasim

 On 4/20/06, Munson, Jacob [EMAIL PROTECTED] wrote:
 
  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.
 
 
  -
 
  This transmission may contain information that is privileged,
 confidential
  and/or exempt from disclosure under applicable law. If you are not the
  intended recipient, you are hereby notified that any disclosure,
 copying,
  distribution, or use of the information contained herein (including any
  reliance thereon) is STRICTLY PROHIBITED. If you received this
 transmission
  in error, please immediately contact the sender and destroy the material
 in
  its entirety, whether in electronic or hard copy format. Thank you. A1.
 
 
 
 

 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238460
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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 http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238268
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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.


-

This transmission may contain information that is privileged, confidential 
and/or exempt from disclosure under applicable law. If you are not the intended 
recipient, you are hereby notified that any disclosure, copying, distribution, 
or use of the information contained herein (including any reliance thereon) is 
STRICTLY PROHIBITED. If you received this transmission in error, please 
immediately contact the sender and destroy the material in its entirety, 
whether in electronic or hard copy format. Thank you. A1.



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238313
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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');
driverManager = CreateObject('java', 'java.sql.DriverManager');
//user name and passwword
conn = driverManager.getConnection( connURL, 'USER', 'PASSWORD' );
sql = delete from atable where id = ?;
ps = conn.prepareStatement(sql);
ps.setString(1,'2');
n = ps.executeUpdate();
/cfscript
cfoutput
Records Affected: #n#
/cfoutput

HTH

Qasim

On 4/20/06, Munson, Jacob [EMAIL PROTECTED] wrote:

 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.


 -

 This transmission may contain information that is privileged, confidential
 and/or exempt from disclosure under applicable law. If you are not the
 intended recipient, you are hereby notified that any disclosure, copying,
 distribution, or use of the information contained herein (including any
 reliance thereon) is STRICTLY PROHIBITED. If you received this transmission
 in error, please immediately contact the sender and destroy the material in
 its entirety, whether in electronic or hard copy format. Thank you. A1.



 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238317
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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 on the query tag.

It returns a structure of information including the SQL, number of
records affected, time and some other stuff.

Cheers,

Sam

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238318
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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 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 on the query tag.

 It returns a structure of information including the SQL, number of
 records affected, time and some other stuff.

 Cheers,

 Sam

 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238319
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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 contain information that is privileged, confidential 
and/or exempt from disclosure under applicable law. If you are not the intended 
recipient, you are hereby notified that any disclosure, copying, distribution, 
or use of the information contained herein (including any reliance thereon) is 
STRICTLY PROHIBITED. If you received this transmission in error, please 
immediately contact the sender and destroy the material in its entirety, 
whether in electronic or hard copy format. Thank you. A1.



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238320
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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', 'java.sql.DriverManager');
//user name and password
conn = driverManager.getConnection( connURL, 'USER', 'PASSWORD' );
sql = update budgets.dbo.budgetids set CC = ? where budgetid like ?;
ps = conn.prepareStatement(sql);
ps.setString(1,'400');
ps.setString(2,'B007%');
n = ps.executeUpdate();
/cfscript
cfoutput
Records Affected: #n#
/cfoutput

Notice that I had to give a fully qualified path to the table in my SQL
statement.

 -Original Message-
 From: Qasim Rasheed [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, April 20, 2006 12:06 PM
 
 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');
 driverManager = CreateObject('java', 'java.sql.DriverManager');
 //user name and passwword
 conn = driverManager.getConnection( connURL, 'USER', 'PASSWORD' );
 sql = delete from atable where id = ?;
 ps = conn.prepareStatement(sql);
 ps.setString(1,'2');
 n = ps.executeUpdate();
 /cfscript
 cfoutput
 Records Affected: #n#
 /cfoutput


[INFO] -- Access Manager:
This transmission may contain information that is privileged, confidential 
and/or exempt from disclosure under applicable law.  If you are not the 
intended recipient, you are hereby notified that any disclosure, copying, 
distribution, or use of the information contained herein (including any 
reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in 
error, please immediately contact the sender and destroy the material in its 
entirety, whether in electronic or hard copy format.  Thank you.   A2



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238321
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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 queries?

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:238060
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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

2006-04-19 Thread Russ Michaels
erm, god knows what this guys reply has to do with your question but.

No, only selects return a recordcount.
Although SQL does return a message about how many records are updated, but
I cannot recall if this is stored in the query object, so try cfdumping 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 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 queries?
 
 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:238061
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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

2006-04-19 Thread Nick Tong - TalkWebSolutions.co.uk
I agree with Russ - i'm not sure if you can but although i can't test on the
machine i'm on at the mo it might be worth looking at whats returned in the
metadata (getMetaData) and the query result structure

http://www.succor.co.uk/index.cfm/2006/3/21/The-cfquery-result-structure



On 19/04/06, Russ Michaels [EMAIL PROTECTED] wrote:

 erm, god knows what this guys reply has to do with your question but.

 No, only selects return a recordcount.
 Although SQL does return a message about how many records are updated, but
 I cannot recall if this is stored in the query object, so try cfdumping 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 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 queries?
 
  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:238069
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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 specification. More importantly, 
it is only part of JDBC 3 and CF uses JDBC 2.

Time to visit http://www.macromedia.com/go/wish/

Jochem

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238159
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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 the number of records
 affected is not part of the SQL specification. More importantly,
 it is only part of JDBC 3 and CF uses JDBC 2.

 Time to visit http://www.macromedia.com/go/wish/


Jochem, I'm having a hard time believing that you might be incorrect
;) , but I believe CFMX's drivers uses the JDBC 3.0 spec. The latest
available drivers supplied by Adobe for ColdFusion are 3.5, and,
according to DataDirect's site, All of our drivers support JDBC 3.0
specification features that greatly increase developer productivity
and make for more robust applications.:

http://www.datadirect.com/products/jdbc/why_choose_jdbc/index.ssp

Am I wrong?

Regards,
Dave.

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238162
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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 and CF uses JDBC 2.

 Time to visit http://www.macromedia.com/go/wish/
 
 Jochem, I'm having a hard time believing that you might be incorrect
 ;) , but I believe CFMX's drivers uses the JDBC 3.0 spec. The latest
 available drivers supplied by Adobe for ColdFusion are 3.5, and,
 according to DataDirect's site, All of our drivers support JDBC 3.0
 specification features that greatly increase developer productivity
 and make for more robust applications.:
 
 http://www.datadirect.com/products/jdbc/why_choose_jdbc/index.ssp
 
 Am I wrong?

(Some of) the drivers support it, but as long as CF doesn't use 
it that doesn't really matter. The chain is as strong as the 
weakest link.

Jochem



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238164
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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

2006-04-19 Thread Ben Nadel
I have been sort of following this conversation and I am just curious, are
ya'll just debating usefullness? Or is the return of the recordcount
actually creating a problem somewhere?  


...
Ben Nadel 
www.bennadel.com

-Original Message-
From: Dave Carabetta [mailto:[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 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 specification. More importantly, it is only 
 part of JDBC 3 and CF uses JDBC 2.

 Time to visit http://www.macromedia.com/go/wish/


Jochem, I'm having a hard time believing that you might be incorrect
;) , but I believe CFMX's drivers uses the JDBC 3.0 spec. The latest
available drivers supplied by Adobe for ColdFusion are 3.5, and, according
to DataDirect's site, All of our drivers support JDBC 3.0 specification
features that greatly increase developer productivity and make for more
robust applications.:

http://www.datadirect.com/products/jdbc/why_choose_jdbc/index.ssp

Am I wrong?

Regards,
Dave.



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238165
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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

2006-04-19 Thread Ken Ferguson
I think Pete just started the thread hoping there was a way to make 
update queries return a value in the recordcount for how many rows were 
updated instead of returning zero.

--Ferg

Ben Nadel wrote:
 I have been sort of following this conversation and I am just curious, are
 ya'll just debating usefullness? Or is the return of the recordcount
 actually creating a problem somewhere?  


 ...
 Ben Nadel 
 www.bennadel.com

 -Original Message-
 From: Dave Carabetta [mailto:[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 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 specification. More importantly, it is only 
 part of JDBC 3 and CF uses JDBC 2.

 Time to visit http://www.macromedia.com/go/wish/

 

 Jochem, I'm having a hard time believing that you might be incorrect
 ;) , but I believe CFMX's drivers uses the JDBC 3.0 spec. The latest
 available drivers supplied by Adobe for ColdFusion are 3.5, and, according
 to DataDirect's site, All of our drivers support JDBC 3.0 specification
 features that greatly increase developer productivity and make for more
 robust applications.:

 http://www.datadirect.com/products/jdbc/why_choose_jdbc/index.ssp

 Am I wrong?

 Regards,
 Dave.



 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238168
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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 always return 0, which is not useful.

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238170
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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

2006-04-19 Thread Ben Nadel
Claude,

Sorry, I fogot the original question... I thought at some point it was being
argued that CF shouldn't return a RecordCount on non-selecting queries...
Good luck with a solution.

...
Ben Nadel 
www.bennadel.com
-Original Message-
From: Claude Schneegans [mailto:[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 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 always return 0, which is not
useful.

--
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED]) Thanks.




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238175
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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 query name as a
valid variable.  Here's what I tried:

cfquery name=updateBID datasource=budgets
   update budgetids
   set CC = '400'
   where budgetid like 'B007%'
/cfquery

cfdump var=#updateBID#

cfset qmeta = getMetaData(updateBID)

cfdump var=#qmeta#


The above returns this error:
Variable UPDATEBID is undefined.








-


[INFO] -- Access Manager:
This transmission may contain information that is privileged, confidential 
and/or exempt from disclosure under applicable law.  If you are not the 
intended recipient, you are hereby notified that any disclosure, copying, 
distribution, or use of the information contained herein (including any 
reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in 
error, please immediately contact the sender and destroy the material in its 
entirety, whether in electronic or hard copy format.  Thank you.   A2



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238184
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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 http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238187
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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.

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238189
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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..

!--- Select the recourd count. ---
SELECT
  @record_count AS RecordCount
;
/cfquery

...
Ben Nadel 
www.bennadel.com


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238191
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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;
 
 SET @record_count = ISNULL(
   (
 SELECT COUNT(*) AS record_count FROM [TABLE] WHERE  
 where clauses 
   ),
   0
 ); 
 
 !--- Now run update ---
 UPDATE. WHERE..
 
 !--- Select the recourd count. ---
 SELECT
   @record_count AS RecordCount
 ;
 /cfquery

This transmission may contain information that is privileged, confidential 
and/or exempt from disclosure under applicable law. If you are not the intended 
recipient, you are hereby notified that any disclosure, copying, distribution, 
or use of the information contained herein (including any reliance thereon) is 
STRICTLY PROHIBITED. If you received this transmission in error, please 
immediately contact the sender and destroy the material in its entirety, 
whether in electronic or hard copy format. Thank you. A1.



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238201
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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 breeze.

Now for DELETE, it's another story.
First count them, then delete them?

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238211
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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 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 breeze.

 Now for DELETE, it's another story.
 First count them, then delete them?

 --
 ___
 REUSE CODE! Use custom tags;
 See http://www.contentbox.com/claude/customtags/tagstore.cfm
 (Please send any spam to this address: [EMAIL PROTECTED])
 Thanks.


 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238224
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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 during
 an update statement.

 Pete

 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238009
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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

2006-04-18 Thread Mike Klostermeyer
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?

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-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
 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:238010
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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

2006-04-18 Thread Rob Wilkerson
Sorry, I should have been more clear.  I meant that the return value
(queryname.recordCount) was not useful.  Not the count itself.

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?

 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-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
  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:238011
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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

2006-04-18 Thread Ben Nadel
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 that this is happening as it is just sending the SQL
command to the Database. SQL is the only player that knows whether or not
rows will be returned, so CF has to be ready in case. 

...
Ben Nadel 
Web Developer
Nylon Technology
350 7th Ave.
Suite 1005
New York, NY 10001
212.691.1134 x 14
212.691.3477 fax
www.nylontechnology.com

Sanders: Lightspeed too slow?
Helmet: Yes we'll have to go right to ludacris 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) was not useful.  Not the count itself.

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?

 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-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 
  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:238017
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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

2006-04-18 Thread Ryan Guill
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 that this is happening as it is just sending the SQL
 command to the Database. SQL is the only player that knows whether or not
 rows will be returned, so CF has to be ready in case.

 ...
 Ben Nadel
 Web Developer
 Nylon Technology
 350 7th Ave.
 Suite 1005
 New York, NY 10001
 212.691.1134 x 14
 212.691.3477 fax
 www.nylontechnology.com

 Sanders: Lightspeed too slow?
 Helmet: Yes we'll have to go right to ludacris 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) was not useful.  Not the count itself.

 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?
 
  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-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
   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:238018
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


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

2006-04-18 Thread Ben Nadel
Very true, not all DBs can handle the multiple query calls... Which means
again that CF has to be able to handle different scenarios... Hence, always
returning row count.  


...
Ben Nadel 
Web Developer
Nylon Technology
350 7th Ave.
Suite 1005
New York, NY 10001
212.691.1134 x 14
212.691.3477 fax
www.nylontechnology.com

Sanders: Lightspeed too slow?
Helmet: Yes we'll have to go right to ludacris speed.
-Original Message-
From: Ryan Guill [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 18, 2006 1:02 PM
To: CF-Talk
Subject: Re: Why is there query.recordcount 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 that this is happening as it is just sending 
 the SQL command to the Database. SQL is the only player that knows 
 whether or not rows will be returned, so CF has to be ready in case.

 ...
 Ben Nadel
 Web Developer
 Nylon Technology


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238027
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54