Share this page

# lr_db_disconnect

Disconnects from a database.

    int lr_db_disconnect("StepName=<step_name>", "ConnectionName=<connection_name>", LAST );

Alphabetical Listing - C Language Utility Functions

## Arguments

Name | Comments
--- | ---
StepName | The name of the step, as it appears in the test tree. Any text can be used.
ConnectionName | The logical name for the connection specified in lr_db_connect.
LAST | This delimiter marks the end of the argument list.

The lr_db_disconnect function disconnects a database connection.

This function is supported only under the Windows operating system.

You must call lr_db_disconnect for each connection established by lr_db_connect to terminate the connection.

Add lr_db_disconnect to the vuser_end section of the script. Adding this function to the Action section can increase performance overhead during load testing.

## Return Values

This function returns LR_PASS on success and LR_FAIL on failure.

## Parameterization

All string arguments (char type) can be parameterized using standard parameterization.

## Example

In the following example, lr_db_disconnect disconnects connection db1.

    lr_db_disconnect("StepName=Disconnect",
            "ConnectionName=db1", LAST );

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