Share this page

# 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 );

            i=i+1;
        }

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: