· Sep 20, 2016

Caché SQL error (ODBC?) - <<METHOD DOES NOT EXIST>Prepare+41^%SYS.SQLSRV *%New,%sqlcq

So just this morning we started to get this error from all of our SQL-client based tools that connect to our Caché SQL via ODBC: 

[%msg: <Error instantiating cached query class in Prepare(): <METHOD DOES NOT EXIST>Prepare+41^%SYS.SQLSRV *%New,%sqlcq>] (State:S1000, Native Code: 190)]


No queries work... any help? stumped over here.


doing a SQL query via Class %SQL.Statement


in Caché command line works... so that's why I think it's an ODBC issue..


I can't seem to find a SQLSRV class in the %SYS documatic

Discussion (6)0
Log in or sign up to continue

Jason - if you haven't sen Dave's response below, please do so.  If you want this investigated further I recommend opening an issue with InterSystems Worldwide Response Center (WRC... a.k.a. Support Department) by going to  We would be happy to help you figure out what happened, why it happened, and how to prevent it in the future.  

This same issue was reported a week or two ago to the WRC.

Purging cached queries should clear the issue.

It appears to be an issue where the server gets into a state where the cached query class gets an error during creation (that is not reported) and the class is created without any methods.  I believe that customer was on version 2014.1.  Can you please let us know what version you saw this problem on?

Also, if you can reproduce the issue, please contact the WRC with the details.  Thank you.

Also, %SYS.SQLSRV is a routine, not a class, which is why you could not find information on it in documatic.