all groups > coldfusion flash integration > october 2007 >
You're in the

coldfusion flash integration

group:

CF.query problems with CF8


CF.query problems with CF8 sebFrance
10/14/2007 3:56:25 PM
coldfusion flash integration:
Hello, in migration to CF8 (from CF7) when we use :

CF.query("xx","DELETE FROM TEST WHERE TR=1"); for example

CF failed with
java.lang.ClassCastException: coldfusion.sql.CFNoResultSetTable cannot be cast
to coldfusion.sql.QueryTable
This query run good under CF7 but failed under CF8

When the query is a "SELECT ..." no problems under CF8

Seb
Re: CF.query problems with CF8 sebFrance
10/14/2007 4:15:00 PM
CF.query does not seem to tell the difference between SELECT query which
returns a ResultSet as the executeQuery while INSERT, UPDATE or DELETE returns
an int.
The problem must be in the decision to use either or executeUpdate in
executeQuery method CF.query (in CF8)
Thank you for all.
Re: CF.query problems with CF8 sebFrance
10/15/2007 5:03:50 PM
Hello,
I must clarify that the code using the CF.query is a .asr in SSAS
Re: CF.query problems with CF8 sebFrance
10/16/2007 4:25:18 AM
Hello,

Until the problem is corrected, I applied the following solution, which is not
very elegant but quite effective:

As CF.query tries to return a Result Set I simply turned the query above

CF.query ( "xx", "DELETE FROM TEST WHERE TR = 1");
In
CF.query ( "xx", "SELECT 1 AS TOTAL DELETE FROM TEST WHERE TR = 1 ");

This formula returning a resultset, CF.query in this case content.

Séb
AddThis Social Bookmark Button