Troubleshoot 586 error message id with state 5 – The prepared statement handle 1 is not valid in this

Recently I worked with one of customer where in jTDS application getting an error 586 and in Profiler Trace we could see an exception with error message id : 586 State 5 with below text: The prepared statement handle 1 is not valid in this context.  Please verify that current database, user default schema, and ANSI_NULLS… Read more