background image
<< Function Sequence | Grids >>
<< Function Sequence | Grids >>

Oracle server

Database Vuser Scripts · Developing Database Vuser Scripts
Creating Vuser Scripts
Chapter 9, page 149
In the following script, VuGen recorded the actions of an operator who opened a
connection to an Oracle server and then performed a query requesting the local
settings.
lrd_init(&InitInfo, DBTypeVersion);
lrd_open_connection(&Con1, LRD_DBTYPE_ORACLE, "s1", "tiger", "hp1",
"", 0, 0, 0);
lrd_open_cursor(&Csr1, Con1, 0);
lrd_stmt(Csr1, "select parameter, value from v$nls_parameters "
" where (upper(parameter) in ('NLS_SORT','NLS_CURRENCY',"
"'NLS_ISO_CURRENCY', 'NLS2007LANGUAGE',"
"'NLS_TERRITORY'))", -1, 0 /*Non deferred*/, 1 /*Dflt Ora Ver*/, 0);
lrd_bind_col(Csr1, 1, &D1, 0, 0);
lrd_bind_col(Csr1, 2, &D2, 0, 0);
lrd_exec(Csr1, 0, 0, 0, 0, 0);
lrd_fetch(Csr1, 7, 7, 0, PrintRow2, 0);
. . .
lrd_close_cursor(&Csr1, 0);
lrd_commit(0, Con1, 0);
lrd_close_connection(&Con1, 0, 0);
lrd_end(0);