Little cfquery gotcha
Here’s something I do quite regularly:
This is all good until you do something like:
For whatever reason, CF craps out here and complains that ‘myquery’ is not defined. The problem only occurs, as far as I am aware, when you use SELECT syntax in your INSERT statement, something that is often neccessary. The workaround is straightforward, thankfully:
Thanks to Neil Smith for the work around; I’d been using a separate query with @@identity for some time until today - far from good.
Dom