MSSQL 7.2.2 driver exec SP not working

My site has been running fine on Lucee 5.3.6 and MSSQL 7.2.2 driver for a while.
I do have one cfc function that isn’t used much at all that does an “exec” on a store procedure and returns a resultset. This will not work on my MSSQL driver datasource but does work find if I use a jTDS datasource to the same database. On MSSQL it shows the exec in debug but 0 records.

The only thing I can think that changed is when I updated to 5.3.6, I created a whole new VM and used the latest installer. So Tomcat 9 instead of 8.5 and JDK 11 instead of 8.

Note: The problem occurs doing a Query.cfc query.

Created a test .cfm with cfquery, queryExecute, and Query to both MSSQL driver and jTDS driver. Problem only happens using Query and exec with the MSSQL driver. Query with a select works fine.

Egads this is weird.

This is a remote cfc that returns info about an item. I setup my laptop to try and debug with commandbox and different mssql jdbc. I had an older copy of my live database so I had to use a different item id. Low and behold some work. Don’t know why some don’t with Query.cfc. I do notice metainfo returns a partial recordcount on the ones that don’t work. I also ran Sql Profiler and the command works fine in Management Studio, so I have to assume it is something in Query.cfc.

I’m curious if it’s related to this


Related to more than one result coming back from a query.

Also, is there a reason you’re not using cfstoredproc?

Yep. That fixes it.

Tried different mssql jdbc and got same error.
Using writedump in Query.cfc, everything was fine til the query line.
Compiled new snapshot and got same error.
Applied LDEV-3102 code to QueryImpl.java and now works.

1 Like

cc/ @Zac_Spitzer @micstriit @dswitzer

Glad my fix works for you. Hopefully it’ll be merged into main soon.

2 Likes