JDBC Drivers 3.4 Bug for ColdFusion
Not only did Adobe technote http://www.adobe.com/go/1a3c2ad0 not fix the issue I was having with quotes doubling, but it introduced a bug into all of our applications built from our CMS codebase for SQL Server. I'll pre-empt some comments by saying that I know the following approach is non-standard and there is a workaround but the fact is that it was done and we are looking to fix it. When we insert rows into tables with uniqueidentifier types we use triggers to return the generated UUID back to ColdFusion in some cases. For example:
(SELECT NEWID(), etc.)
For the curious, the alternative would be to use the SQL variable @@identity which only works on columns with a single identity column (not combined keys):
(SELECT NEWID(), etc.)
SELECT @@identity as history_id
The bug itself is that the first code sample will fail to deliver a recordset so if your cfquery name was qAddHistory you get an error message if you try to dump out qAddHistory to the screen since the recordset is empty. I'm not sure if this change in behaviour was deliberate or incidental but either way, my options are to find and fix every instance of the old style code to the @@identity approach or rollback the driver.
For anyone wishing to try the trigger approach here is some example code
FOR INSERT
AS
SELECT history_id FROM INSERTED