2 Replies Latest reply: Dec 13, 2010 2:40 PM by 696728 RSS

    Exception from HRESULT: 0x800456C7 error while trying to extarct Journal

    784984
      Hi,

      I am trying to extract a Jounal task from HFM using C# code and I encountered this error message:
      Exception from HRESULT: 0x800456C7. Can anyone help me explain what the problem is? The code for the extract task is shown below:

      public void Extract_Journal()
      {
      string strJScenario = System.Configuration.ConfigurationSettings.AppSettings["JScenario"];
      string strJYear = System.Configuration.ConfigurationSettings.AppSettings["JYear"];
      string strJPeriod = System.Configuration.ConfigurationSettings.AppSettings["JPeriod"];
      string strExtractJournalPathJlf = System.Configuration.ConfigurationSettings.AppSettings["ExtractPathJournalJlf"];
      string strExtractJournalPathLog = System.Configuration.ConfigurationSettings.AppSettings["ExtractPathJournalLog"];
      long lScen;
      long lYear;
      HSVJOURNALLOADACVLib.HsvJournalLoadACV cJournalLoadACV;
      HSVJOURNALLOADACVLib.IHsvLoadExtractOptions jOptions;
      HSVJOURNALLOADACVLib.IHsvLoadExtractOption jOpt;


      //HSVJOURNALLOADACVLib.IHsvLoadExtractOption jYearOpt;
      cJournalLoadACV = new HSVJOURNALLOADACVLib.HsvJournalLoadACV();
      //Specify the HsvSession object for the application.
      cJournalLoadACV.SetSession(_oHsvSession);
      //Initialize the IHsvLoadExtractOptions interface.
      jOptions = cJournalLoadACV.ExtractOptions;
      //Set the scenario to "Actual"
      jOpt = jOptions.get_Item(2);
      lScen = getMemberId((short)HFMCONSTANTSLib.tagHFMDIMENSIONS.DIMENSIONSCENARIO, strJScenario);
      jOpt.CurrentValue = lScen;
      //Set the year to "2010"
      jOpt = jOptions.get_Item(4);
      lYear = getMemberId((short)HFMCONSTANTSLib.tagHFMDIMENSIONS.DIMENSIONYEAR, strJYear);
      jOpt.CurrentValue = lYear;
      //Extract the Journals
      cJournalLoadACV.Extract(strExtractJournalPathJlf, strExtractJournalPathLog);
      }
        • 2. Re: Exception from HRESULT: 0x800456C7 error while trying to extarct Journal
          696728
          Hi,

          How did you resolve this issue? Could you please post the solution. I am also getting similar error. I am trying to extract/load metadata using VBScript code but receiving an error initializing the IHsvLoadExtractOptions

          Here is the sub routine:

          Sub LoadMetaACV(sFile, sLog)
          Dim cMetadataLoadACV
          Dim cOptions
          Dim cOpt
          Set cMetadataLoadACV = New HsvMetadataLoadACV
          'g_cSession is an HsvSession object reference
          cMetadataLoadACV.SetSession g_cSession
          'Initialize the IHsvLoadExtractOptions interface.
          Set cOptions = cMetadataLoadACV.LoadOptions
          'Turn on Replace mode
          Set cOpt = cOptions.Item(HSV_METALOAD_OPT_USE_REPLACE_MODE)
          cOpt.CurrentValue = False
          'Load from an XML file
          Set cOpt = cOptions.Item(HSV_METALOAD_OPT_FILE_FORMAT)
          cOpt.CurrentValue = HSV_METALOADEX_FORMAT_XML
          'Load the Metadata
          cMetadataLoadACV.Load sFile, sLog
          End Sub

          ------

          Thank you in advance!!