It's possible there's something in my logic that is doing that ... but it was happening to one query that was referring to a value set at the top of the file (via cfqueryparam) and when I removed that cfqueryparam it started to happen to a different query. And, I should add, the queries in question were working fine for years before on a coldfusion MX server. This is a new page in the app, but the queries are all being included from old working template files.
Here's the one that is breaking now:
<cfquery name="CheckCredentials" datasource="#application.crossreg_dsn#">
SELECT [name_first]+' '+[name_last] as name
FROM [CrossReg].[dbo].[People] p
INNER JOIN dbo.Roles r on r.role_id = p.role_id
WHERE uni = <cfqueryparam cfsqltype="cf_sql_char" value="#Session.username#">
Session.username is being returned from a CAS authentication system. I've never had troubles with it before.
Just to let you know that you are not crazy, I have had the same issue in CF9 (standard Windows install) with SQL Server 2005. I also have not found a solution, and in all cases I have had to remove the <cfqueryparam> tag. Restarting CF (or, alternately, restarting SQL Server) solves the problem temporarily, but after a few days it always comes back.
If you come across a solution, please update this post!
I had the same problem due to a query that errored then all subsequent queries would error as well with this error message
I found this blog post regarding this issue: