« Previous Next »

Thread: COMIISOutputContextClassClass uses commas as delimiter? I was expecting the IIS format :(

Last post 11-03-2009 6:01 PM by jdelinger. 3 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (4 items)

Sort Posts:

  • 08-11-2009, 7:43 PM

    COMIISOutputContextClassClass uses commas as delimiter? I was expecting the IIS format :(

    Hi all,

    My log output is using commas instead of using the IIS format. What am I doing wrong?
    Here is my code:

    public static bool GetResultsFromBatch(string query)
    {
     LogQueryClassClass LogParser = new LogQueryClassClass();
     COMIISW3CInputContextClassClass pObjInput  = new COMIISW3CInputContextClassClass();
     COMIISOutputContextClassClass pObjOutput = new COMIISOutputContextClassClass(); //comma and without header

     try
     {
      LogParser.ExecuteBatch(query, pObjInput, pObjOutput);
      return true;
     }
     catch (Exception e)
     {
      return false;
     }
    }

    Thank you!

     

    MDM
  • 08-27-2009, 4:55 PM In reply to

    Re: COMIISOutputContextClassClass uses commas as delimiter? I was expecting the IIS format :(

    Anybody? :(

    MDM
  • 11-02-2009, 9:35 AM In reply to

    • kelvin3
    • Not Ranked
    • Joined on 11-02-2009, 2:27 PM
    • Posts 1

    Re: COMIISOutputContextClassClass uses commas as delimiter? I was expecting the IIS format :(

    Did you ever figure this out? I had a slightly different problem... and slightly different requirements, so I'm not using the batch processing... I had to create my own "batching" because I needed more flexibility.

     ANYWHO, this is where my problem was:

        ILogRecordset queryResult = logQuery.Execute(sbQuery.ToString(), inputFormat);
        var sbOutput = new StringBuilder();

        for (; !queryResult.atEnd(); queryResult.moveNext())
         sbOutput.AppendLine(queryResult.getRecord().toNativeString(", "));

        queryResult.close();

    When I removed that comma, the delimiter was a space, as expected.

     I hope this helps...

     

  • 11-03-2009, 6:01 PM In reply to

    Re: COMIISOutputContextClassClass uses commas as delimiter? I was expecting the IIS format :(

    Well I was expecting to receive the whole IIS format including headers etc.... but what you posted here is a workaround that works well too :)

    thanks!

     

Page 1 of 1 (4 items)
Microsoft Communities