« Previous Next »

Answered Thread: iCheckPoint issue

Last post 09-25-2009 3:35 PM by joelangley. 4 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (5 items)

Sort Posts:

  • 09-23-2009, 1:39 PM

    • jwaz1999
    • Not Ranked
    • Joined on 03-15-2004, 5:40 PM
    • West Los Angeles, California
    • Posts 4

    iCheckPoint issue

    Hello,

    I'm having an issue when using the checkpoint functionality of the log parser.  The subsequent calls to the updated file always skip the first record.  This happens every time.

    It could be a format issue of my file where the last record is thought to exist even though it is incomplete. 

    Does anyone know a way around this?

    Thanks,

    Jeff

    Jeff Wasilauski, MCAD .NET, MCP
    C# .NET-WEB DEVELOPMENT
  • 09-23-2009, 7:44 PM In reply to

    Re: iCheckPoint issue

     Odd...is this a basic query or are you calling from code? Can you show us the code/query?

    Check out my blog for other cool tips and tricks:

    http://joelangley.blogspot.com/
  • 09-24-2009, 12:52 PM In reply to

    • jwaz1999
    • Not Ranked
    • Joined on 03-15-2004, 5:40 PM
    • West Los Angeles, California
    • Posts 4

    Re: iCheckPoint issue

    Here's the query. It is a basic query called from a batch file, used in an SSIS package call.  

    ::Handles the importing of the files from the device
    ::
    "C:\Program Files\Log Parser 2.2\LogParser" "SELECT field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14,field15, field16, field17,field18, field19, field20, field21, field22, field23, field24, field25, field26, field27, field28, field29, field30, field31, field32, field33, field34, field35, field36, field37, field38, field39, field40, field41, field42, field43, field44, field45, field46, field47, field48, field49, field50, field51, field52, field53, field54, field55, field56, field57, field58, field59 INTO C:\sansaycdr\Formattedcdr111.txt FROM C:\cdr\cdr111.txt" -nFields:59 -iCheckPoint:"C:\cdr\Formattedcdr111.lpc" -i:TSV -o:TSV -iCheckPoint:"C:\cdr\Formattedcdr111.lpc" -oSeparator:";" -iSeparator:";" -headerRow:OFF -headers:OFF -filemode:1

    Everything else works as expected.  It just always skips the first record.

    I'm working on another way to do this with log parser. 

    Can you use sub-queries with log parser? 

    What about variables?

    If I could use a sub query or store the last record from the previous query in a variable, I could get this to work that way.

    Thanks,

    Jeff

    Jeff Wasilauski, MCAD .NET, MCP
    C# .NET-WEB DEVELOPMENT
  • 09-24-2009, 5:03 PM In reply to

    • jwaz1999
    • Not Ranked
    • Joined on 03-15-2004, 5:40 PM
    • West Los Angeles, California
    • Posts 4

    Answered Re: iCheckPoint issue

    I found out this is a bug.

    The link to a post is at:

    https://forums.iis.net/p/1146015/1851227.aspx#1851227

    However, the fix here doesn't work.

    I was able to fix this by retrieving the ID first, saving it in a variable, then passing it as a parameter to the second query.  Not very efficient, but it works.

    Jeff Wasilauski, MCAD .NET, MCP
    C# .NET-WEB DEVELOPMENT
  • 09-25-2009, 3:35 PM In reply to

    Re: iCheckPoint issue

    Unfortunately, no subqueries...variables can work, but I am not sure how you would do it..perhaps scripting vb, jscript, or .NET with the variable. I may have glossed over this, but why do you have 2 -iCheckPoint at the end? They both seem to be the same thing.

    Check out my blog for other cool tips and tricks:

    http://joelangley.blogspot.com/
Page 1 of 1 (5 items)
Microsoft Communities