12 Replies Latest reply: Mar 21, 2012 6:46 AM by HiTopp RSS

    ColdFusion caching SQL Server credentials?

    HiTopp Community Member

      I have been using ColdFusion's storedProc() service for a while with no issue.  However, I have run into a scenario where I have a local stored procedure executing a remote stored procedure.  When I attempt this via ColdFusion, I receive a very cryptic error:

       

      The DBMS has returned the command code 224...

       

      The following is the code I am using:

       

      variables.storedProcService = new storedProc();
      
      variables.storedProcService.clear();
      variables.storedProcService.setAttributes(datasource="DATASOURCE", procedure="STOREDPROCNAME");
      variables.storedProcService.addParam(cfsqltype="CF_SQL_INTEGER", type="in", value=0);
      variables.storedProcService.execute();
      

       

      However, executing the exact same procedures from SQL Server Management Studio results in no issues.

       

      Then, when I use the following code:

       

      variables.storedProcService = new storedProc();
      
      variables.storedProcService.clear();
      variables.storedProcService.setAttributes(datasource="DATASOURCE", procedure="STOREDPROCNAME", username="USERNAME", password="PASSWORD");
      variables.storedProcService.addParam(cfsqltype="CF_SQL_INTEGER", type="in", value=0);
      variables.storedProcService.execute();
      

       

      The execution runs without issue.  My question is this, does ColdFusion cache SQL Server/Datasource credentials?  Why does it [seem to] not use the credentials I provided in Jrun?