SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 3 of 3
  1. #1
    SQA Council
    Join Date
    Mar 2001
    Posts
    8,591
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Need Help with Using db_ fuctions

    User Steve Bobrov (hamud9@yahoo.com.nospam) posted:

    Hi all,
    Can anybody please send me couple of
    comprehensive WR scripts that make use
    of DataBase functions.

    Help is appreciated as always:

    Regards, Steve

    __________________________________________________

  2. #2
    SQA Council
    Join Date
    Mar 2001
    Posts
    8,591
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Need Help with Using db_ fuctions

    User Balasubramanya (Balasubramanya@kshema.com.nospam) posted:

    ------_=_NextPart_001_01C1351A.FE92AAF2
    Content-Type: text/plain;
    charset="iso-8859-1"

    Hi steve,
    The following example script executes a query, captures values from db and
    stores it into a excel sheet.
    var1=" 'DO' and t1.project_code =t2.project_code and t1.project_code
    =t3.project_code and t1.project_code =t4.project_code and t1.phase_no =
    t2.phase_no and t1.phase_no =t3.phase_no and t1.phase_no = t4.phase_no order
    by t1.phase_no";
    conn1=db_connect
    ("query1","DSN=Quality1;UID=quality1;PWD=quality1; SERVER=LAKKUR");
    #pause(conn1);
    if(conn1!=0)
    {
    tl_step("fail",1,"Connection failed");
    texit;
    }
    db_execute_query ("query1","Select
    t1.phase_no,t1.phase_name,t1.phase_st_date,t1.phas e_end_date,t2.wpa_date,t2.
    wpa_status,t3.rc_date,t3.rc_status,t4.pr_date,t4.p r_status from proj_detail
    t1,work_prod_audit t2,release_committe t3,phase_review t4 where
    t1.project_code="var1" ",record_number);
    #pause(record_number);
    db_write_records("query1","c:\\WINNT\\Profiles\\Ad ministrator\\Desktop\\Repo
    rt.xls",TRUE,NO_LIMIT);



  3. #3
    SQA Council
    Join Date
    Mar 2001
    Posts
    8,591
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Need Help with Using db_ fuctions

    User Tony Davis (tDavis@ceon.com.nospam) posted:

    session = "query1";
    sfoeng3 = "DRIVER={Oracle ODBC
    Driver};SERVER=sfoeng3;UID=itson;PWD=itson;DBQ=sfo eng3;DBA=W;";
    disp_products = "select NAME from productdescription where PRODUCTTYPE <= 3
    and SCHEMA_NAME=";
    static partition[] = {"'JO'","'TONY'","'GAV'","'STEVE'","'DO1'","'DO2'" };

    rc = db_connect( session, sfoeng3 );
    rc = db_execute_query(session, (disp_products & partition[1]),
    record_number);
    for(j = 0; j < record_number; j++){
    db_get_row ( "query1", j, row_content );
    print(row_content);
    }

    rc = db_disconnect ( session );


 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 13.64%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 01:46 PM.

Copyright BetaSoft Inc.