SQL Gateway - ODBC Client Caching the Query/SP CALL to the external Database

Primary tabs

SQL, Ensemble

Hello,

 

In my project, I am calling a store proc on third party database. I am using SQL Gateway and ODBC. Everything is working fine until the store proc changed.  In store proc they have changed the return alias name for a column. In Ensemble Snapshot I am not seeing the modified alias name until I restarted the whole Healthshare instance.

 

Here is my question, is there any other way? We do not want  to take the instance down if it happens after we go live.

 

Thanks

Raghu

  • 0
  • 0
  • 364
  • 0
  • 1

Answers

SQL Adapter does some metadata caching.

See, for example, doc for method EnsLib.SQL.Common:ExecuteProcedure
http://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?P...

"Appending a '#' to the pIO argument (or passing only '#') prevents the adapter from using cached DescribeColumns() results for the procedure call output, forcing a fresh call to ODBC DescribeColumns() every time the stored procedure is invoked. This can be necessary if the procedure is capable of returning different sequences of result types from consecutive invocations"

I'm not sure if this is what happened in this case, though.