Share this page

# Example: lr_db_dataset_action

In the following example, lr_db_dataset_action removes the dataset that was created by lr_db_executeSQLStatement.

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

    lr_db_dataset_action("StepName=RemoveDataset", "DatasetName=MyDataset", "Action=REMOVE", LAST );

In the following example, lr_db_dataset_action prints the contents of the dataset to the Replay Log.

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

        lr_db_dataset_action("StepName=PrintDataset", "DatasetName=MyDataset", "Action=PRINT", LAST );

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: