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
    Dec 2008
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Compare a table in database

    we have two different database one is QA env and another one is production Env. i need to compare a table in these two environment.

    can anybody help me on this.....

    Thanks,
    Suresh

  2. #2
    Advanced Member
    Join Date
    Sep 2007
    Location
    Chennai, Tamil nadu, India
    Posts
    999
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0
    i have never seen bugs sleeping

  3. #3
    Junior Member
    Join Date
    Dec 2008
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Compare a table in database

    can anybody give me the code for getting a rowcount of the table. i already have recordset with me in which i hav executed a query in which the rowcount is abt 190.

  4. #4
    Member
    Join Date
    Apr 2008
    Location
    New York, USA
    Posts
    133
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Compare a table in database

    i use to handle like this...i am not sure whether it is right

    aConnectionString = "**********"

    Set connection = CreateObject("ADODB.Connection")

    connection.open aConnectionString

    'form a query string

    Query = "select * from EIP_PACK"

    RowcountQuery = "select count(*) from EIP_PACK"

    SQL_Query = (Query)

    CountSQL_Query = (RowcountQuery)

    'create a recordset object

    set table1 =createobject("adodb.recordset")


    'Run the query string

    Set table1 = connection.Execute(SQL_Query)

    set table2 =createobject("adodb.recordset")

    'Run the query string

    Set table2 = connection.Execute(SQL_Query)

    Set CountTable = connection.Execute(CountSQL_Query)

    For var_Loop = 0 To table1.Fields.Count - 1

    For intlIndex = 0 to (CountTable(0).Value - 1)

    'colname = table1.Fields(var_Loop).Name 'column name

    'msgbox colname

    While table1.eof = False

    If Trim(table1(var_Loop).Value) = Trim(table2(var_Loop).Value) Then

    Reporter.ReportEvent micPass,"Pass","Success"

    table1.MoveNext

    table2.MoveNext

    Else

    Reporter.ReportEvent micFail,"Fail","Failure"

    End If

    Wend

    table1.MoveFirst

    table2.MoveFirst

    Exit For

    Next

    Next

 

 

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.71%
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:01 AM.

Copyright BetaSoft Inc.