SPONSORS:






User Tag List

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

    How can find record count for the query in robot

    User (MMcNaughton@STSSystems.com.nospam) posted:


    Perform this query seperatly: "select count(*) from DPOrderInfo"

    It returns only one value.

    HTH,
    Max

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

    Re: How can find record count for the query in robot

    User =?iso-8859-1?q?ss=20rr?= (syedrational2002@yahoo.co.in.nospam) posted:

    Hi Srinu,

    I too faced that problem but since i was in a hurry i
    wrote a function which accepts the RecordSet as
    Parameter and iterates it untill end of file.Store the
    count and pass it.
    After the execution of this function dot forget to use
    Rs.MoveNext

    I Dont think this is a best practise ,but it will be
    give u the result.

    Do reply to me if it is useful

    cheers


    --- srinivas ankatha <srinivas_ankatha@yahoo.com>
    wrote: > Hi
    ("DSN=Sqldsn;UID=trainee;PWD=techsoft",outputStr,p rompt:=3)
    ************************************************** **************************
    ************************************************** ***************************

    __________________________________________________ ______________________
    For live cricket scores download Yahoo! Score Tracker
    at: http://in.sports.yahoo.com/cricket/tracker.html

    ---

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

    Re: How can find record count for the query in robot

    User (MMcNaughton@STSSystems.com.nospam) posted:

    It's simpler to do a "select count(*) from DPOrderInfo" to get a count of
    the number of rows in a table, you can use the open connection in addition.


    Dim destination(1,1) as variant
    connection =
    SQLOpen("DSN=Sqldsn;UID=trainee;PWD=techsoft",outp utStr,prompt:=3)

    query = "select * from DPOrderInfo"
    retcode = SQLExecQuery(connection,query)
    CountQuery = "Select count(*) from DPOrderInfo"
    retcode = SQLExecQuery(connection,CountQuery)
    RecordCount = SQLRetrieve(connection:=connection, destination:=destination)

    As you can see the destination(1,1) array is useless but a required
    parameter, the return from SQLRetrieve is the number of rows in the result
    set, therefore the record count.

    HTH,
    Max

  4. #4
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How can find record count for the query in robot

    User MArk B. (mkbutler@russellmellon.com.nospam) posted:

    If you are using an ADO recordset then you could use MoveLast. But Max's is
    the easiest to implement.

    MArk B.

    "ss rr" <syedrational2002@yahoo.co.in> wrote in message
    news:108445@sqa-suite-users...
    ************************************************** **************************
    ************************************************** **************************
    *
    ---

 

 

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 04:15 PM.

Copyright BetaSoft Inc.