SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Jun 2006
    Location
    HCMC
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    VBScript - how to compare result set from DB?

    Hi All,

    I was assigned to develop a function in VBScript to compare a result set returned from a SQL query with an expected result set.
    My problem is what format of expected result set should be organized. What is a good approach for this? Or simply execute SQL query, store it in a string and compare it with another string - expected result set.
    Can anyone help me a better solution? Thanks so much.

  2. #2
    Member
    Join Date
    Nov 2005
    Location
    Tamiladu India
    Posts
    50
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: VBScript - how to compare result set from DB?

    Here are the steps-
    a. Use ADODB object
    b. Generate both result sets from database
    c. Set it to appropriate variables
    d. Get it to the loop
    e. Compare the values in the variables inside the loop
    f. Generate the compared test results using ASSERT statements.
    Srivatsan

  3. #3
    Member
    Join Date
    Jul 2011
    Location
    India
    Posts
    381
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: VBScript - how to compare result set from DB?

    I guess you should make use of database checkpoint
    <font color="blue">[i]If there is no struggle, there is no progress!

  4. #4
    Junior Member
    Join Date
    Feb 2011
    Posts
    24
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: VBScript - how to compare result set from DB?

    The only thing that you need to take care of here is that both the data must be in the same form that is datatype. This can always be done using the convert method, and also if there is some float value be careful enough to do the round off appropriately. Best approach is to put them both into string format and use compare function.

 

 

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 10.00%
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 09:57 AM.

Copyright BetaSoft Inc.