Share this page

# lrd_ora8_attr_set_from_handle

Sets an attribute for an LRDDBI handle.

    LRDRET lrd_ora8_attr_set_from_handle( void *mpvLRDDBIHandleTarget, long mliAttrType, void *mpvValue, long mliValueLen,
    int miDBErrorSeverity );

mpvLRDDBIHandleTarget | A pointer to the target LRDDBI handle.
mliAttrType | A qualifier of one of the LRD attributes LRD_ATTR_ORACLE_qualifier
mpvValue | A pointer to the value of the attribute.
mliValueLen | The attribute size for a non null-terminated string." -1" for a null-terminated string and "0" for a handle attribute.
miDBErrorSeverity | The Error Severity Levels of a failure in a database routine.

The lrd_ora8_attr_set_from_handle function sets an attribute of an LRDDBI handle. You must explicitly allocate the handle prior to calling this function using lrd_handle_alloc. This function is only supported for Oracle 8.0 and higher.

For more details refer to the Function Header File lrd.h in the include directory.

## Return Values

See LRD Return Values.

## Parameterization

The following argument can be parameterized using standard parameterization: mpvValue

## Example

In the following example, the lrd_ora8_attr_set_from_handle function assigns the value "OraSes1" to the SESSION attribute.

    lrd_init(&InitInfo, DBTypeVersion);
    lrd_initialize_db(LRD_DBTYPE_ORACLE, 2, 0);
    lrd_env_init(LRD_DBTYPE_ORACLE, &OraEnv1, 0, 0);
    lrd_ora8_handle_alloc(OraEnv1, SERVER, &OraSrv1, 0);
    lrd_ora8_handle_alloc(OraEnv1, SVCCTX, &OraSvc1, 0);
    lrd_ora8_handle_alloc(OraEnv1, SESSION, &OraSes1, 0);
    lrd_server_attach(OraSrv1, "rman", -1, 0, 0);
    lrd_ora8_attr_set_from_handle(OraSvc1, SERVER, OraSrv1, 0, 0);
    lrd_ora8_attr_set(OraSes1, USERNAME, "scott", -1, 0);
    lrd_ora8_attr_set(OraSes1, PASSWORD, "tiger", -1, 0);
    lrd_ora8_attr_set_from_handle(OraSvc1, SESSION, OraSes1, 0, 0);

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