SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 2 of 2

Thread: Recordset Why??

  1. #1
    Member
    Join Date
    Dec 2010
    Posts
    133
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Recordset Why??

    I want to know the use of recordset..whhy do we use it?
    What is the difference between recordset and connection... when both are used to fetch the values for database?

    I have written this code:
    Set con = CreateObject("ADODB.Connection")
    Set rs = CreateObject("ADODB.Recordset")
    con.Open "DSN=Test;"
    rs.Open "select count(*) as rownum from [tbl_cond$]",con
    row_num = trim(rs.Fields("rownum"))
    msgbox row_num
    rs.close

    rs.Open "select * from [tbl_cond$]",con

    For i = 0 to row_num-1
    msgbox rs(i)
    Next


    It works for rs(0) but why doesn't it works for rs(1)

    Pls help

  2. #2
    Advanced Member
    Join Date
    May 2006
    Location
    United Kingdom
    Posts
    742
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0
    Connection - Saying hello with help of driver
    Recordset - keeping valuables in basket to use/modify it by running query in that basket

 

 

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 11.54%
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 06:13 PM.

Copyright BetaSoft Inc.