SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 10 of 10
  1. #1
    Member
    Join Date
    Jul 2008
    Posts
    57
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Query QC Database

    HI,

    I used below code to query data base and worked fine. But EOF,MOVENEXT and other record set related functions are not working from QTP.Any help regading this would be much appriciated.

    Set qcCon=qcutil.QCConnection
    Set qcCom=qcCon.Command
    qcCom.commandtext="SELECT TC_TEST_ID FROM TESTCYCL WHERE TC_CYCLE_ID = " & QCUtil.CurrentTestSet.ID
    set rs=qcCom.execute
    while rs.Eof<>True
    msgbox rs("TC_TEST_ID")
    rs.movenext
    wend

  2. #2
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Query QC Database

    What is the issue? Are you getting any error?

  3. #3
    Senior Member
    Join Date
    Dec 2006
    Location
    Germany, Dresden
    Posts
    1,536
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Query QC Database

    is the CommandLine interface on QC side for users enabled or disabled?
    http://qcmt.pc-polis.de

    de omnibus dubitandum

    For all Questions: Please be sure to take a look at the QTP Manual before posting any Questions, thanks for doing this

  4. #4
    Member
    Join Date
    Jul 2008
    Posts
    57
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Query QC Database

    rscholz660,

    i think its enabled as i was getting rs.recordcount and rs("TC_TEST_ID") values.

    tarun,

    the error i m getting is

    "oject doesnt support this property or method rs.Eof"

  5. #5
    Senior Member
    Join Date
    Dec 2006
    Location
    Germany, Dresden
    Posts
    1,536
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Query QC Database

    Try following:

    while Not rs.EOF
    http://qcmt.pc-polis.de

    de omnibus dubitandum

    For all Questions: Please be sure to take a look at the QTP Manual before posting any Questions, thanks for doing this

  6. #6
    Member
    Join Date
    Jul 2008
    Posts
    57
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Query QC Database

    its not working. its not supporting RS.Eof at all.

  7. #7
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Query QC Database

    The reason is that these methods are not same as ADODB. EOF in this EOR and MoveNext is just Next

    <font class="small">Code:</font><hr /><pre>
    Set qcCon=qcutil.QCConnection
    Set qcCom=qcCon.Command
    qcCom.commandtext="SELECT TC_TEST_ID FROM TESTCYCL WHERE TC_CYCLE_ID = " &amp; QCUtil.CurrentTestSet.ID
    set rs=qcCom.execute
    while NOT rs.EoR
    msgbox rs("TC_TEST_ID")
    rs.next
    wend
    </pre><hr />

  8. #8
    Senior Member
    Join Date
    Dec 2006
    Location
    Germany, Dresden
    Posts
    1,536
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Query QC Database

    another possible solution (like solutions in QC OTA API help)

    Set qcCon=qcutil.QCConnection
    Set qcCom=qcCon.Command
    qcCom.commandtext="SELECT TC_TEST_ID FROM TESTCYCL WHERE TC_CYCLE_ID = " &amp; QCUtil.CurrentTestSet.ID
    set rs=Command.execute

    For i =1 To rs.RecordCount
    MsgBox (rs.FieldValue(0))
    rs.Next
    Next
    http://qcmt.pc-polis.de

    de omnibus dubitandum

    For all Questions: Please be sure to take a look at the QTP Manual before posting any Questions, thanks for doing this

  9. #9
    Member
    Join Date
    Jul 2008
    Posts
    57
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Query QC Database

    Tarun,

    You really rock!! where can i find more help about this.

    rscholz660,

    Thanx a ton for the help

    [img]/images/graemlins/smile.gif[/img]

  10. #10
    Senior Member
    Join Date
    Jan 2006
    Location
    Bengaluru
    Posts
    494
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Query QC Database

    You can find more info on this in QC OTA API help file
    Suraj

 

 

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 7.14%
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 10:07 PM.

Copyright BetaSoft Inc.