LR connection to Oracle database-lr_db_connect

Source: Internet
Author: User
Tags ole

The following function functions for database operations are also provided in LoadRunner, and these database function functions are available only for Web services protocols. Lr_db_connect connecting the database Lr_db_disconnect disconnecting the database lr_db_executesqlstatement executing SQL statements lr_db_dataset_action performing operations on the database lr_db_ GetValue retrieving values from a DataSet the Lr_db_connect function supports four database connection modes by default: • SQL (Native MS SQL Server) · OLE DB (Connect to database using OLE DB) · ODBC ORACLE1, create a new Web service protocol script, 2. Write the test script as follows: Action () {int numrows=0;int i;//connection Database Lr_db_connect ("Stepname=testconnect", " Connectionstring=provider=oraoledb.oracle.1,data SOUCE=ORCL; " "Persist Security Info =true;" "User Id=scott;" "Password=tiger", "CONNECTIONNAME=DB_ORCL", "Connectiontype=oledb", last); Lr_start_transaction ("query_1");// Query Sql:select * from Lr_auto_usersnumrows=lr_db_executesqlstatement ("Stepname=query_1", "CONNECTIONNAME=DB_ORCL", " Sqlstatement=select * from Lr_auto_users "," Datasetname=lrautousers_dataset ", last); Lr_end_transaction (" Query_1 ", LR _auto); Lr_output_message ("Total%d data:", NumRows); while (i LR connects to Oracle database-lr_db_connect
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.