Example: lr_checkpoint

In the following example, lr_checkpoint verifies if the first name of each row in a dataset matches the name "Joe". If a row does not match this first name, the script continues without ending on error.

    int i=1;
    lr_db_executeSQLStatement("StepName=PerformQuery", "ConnectionName=db1", 
    "SQLStatement=SELECT dbo.Customer.CustID, dbo.Customer.FirstName, dbo.Customer.LastName FROM dbo.Customer", 
    "DatasetName=MyDataset", LAST );

    while (i<4) {
        lr_db_getvalue("StepName=GetValue", "DatasetName=MyDataset", 
                "Column=FirstName",  "Row=next", "OutParam=MyOutputParam", LAST );

        lr_output_message("The value is: %s", lr_eval_string("{MyOutputParam}") );
        lr_checkpoint("StepName=VerifyCheckpoint", "ExpectedValue=Joe", 
        "ActualValue={MyOutputParam}", "Compare=Equals", "StopOnValidationError=false", LAST );