Wirunner DB Connection

上一篇 / 下一篇  2012-06-06 10:05:51 / 个人分类:Automation Testing

Database connect

v_result = db_connect("query1","DSN="&db_dsn&";UID="&db_username&";PWD="&db_password&";DBQ="&db_dsn&";");

if (v_result == 0)
{
 ###### getting the number of lines (line -id) in the order
 db_execute_query("query1", "SELECT ORGANIZATION_ID "&
                               "FROM MTL_PARAMETERS " &
                "where ORGANIZATION_CODE= '" & v_org_code & "'; ",v_record_number);
 if (v_record_number > 0)
 {
   v_org_id = db_get_field_value("query1", "#0", "#0");
   report_msg("The id of org " & v_org_code & " is " & v_org_id);
    }
 
}

db_disconnect("query1");

treturn ;


TAG:

 

评分:0

我来说两句

Open Toolbar