Recordset Problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Shailja
    New Member
    • Feb 2007
    • 123

    #1

    Recordset Problem

    Hi,

    I am using VB.. My recordset contains multiple rows and multiple columns. Can anyone tell me how to retreive record from the recordset? Query is:

    SELECT No, Name FROM Temp.

    There are 5 records in table Temp. I want to fetch first record. I want to get the first name. How to do it?
  • vijaydiwakar
    Contributor
    • Feb 2007
    • 579

    #2
    Originally posted by Shailja
    Hi,

    I am using VB.. My recordset contains multiple rows and multiple columns. Can anyone tell me how to retreive record from the recordset? Query is:

    SELECT No, Name FROM Temp.

    There are 5 records in table Temp. I want to fetch first record. I want to get the first name. How to do it?
    Code:
     
    'don't post code with no explanation
    Last edited by willakawill; Mar 14 '07, 03:08 PM. Reason: do not post code without explanation

    Comment

    • willakawill
      Top Contributor
      • Oct 2006
      • 1646

      #3
      Hi Shailja. You will need to post the code that you have so far. If you have no idea how to use ADO you should google 'vb ado tutorial' which will give you far too much information.

      Comment

      • Shailja
        New Member
        • Feb 2007
        • 123

        #4
        Originally posted by willakawill
        Hi Shailja. You will need to post the code that you have so far. If you have no idea how to use ADO you should google 'vb ado tutorial' which will give you far too much information.

        No i am not using ADO. I am doing it with recordset. If recordset contains single row and single column, that is only one value, i am fetching it with the code:rs(0)

        If recordset contains one column and multiple rows, i am fetching it with the code:rs.Fields( 0).Value

        But it recordset contains multiple rows and multiple columns, what code should i write?

        Please tell me.

        Comment

        • willakawill
          Top Contributor
          • Oct 2006
          • 1646

          #5
          Post the code that you have so far.

          Comment

          • vijaydiwakar
            Contributor
            • Feb 2007
            • 579

            #6
            Originally posted by vijaydiwakar
            Code:
             
            'don't post code with no explanation
            my code is self explanetory.... ...
            y u removed it.........
            let it be there if any one have any qry then i'll solve its problem
            Ok..........
            I'm leaving this site

            Comment

            • Shailja
              New Member
              • Feb 2007
              • 123

              #7
              Originally posted by willakawill
              Post the code that you have so far.

              I dont know the code for that. Please please tell me code for that.

              Comment

              • Shailja
                New Member
                • Feb 2007
                • 123

                #8
                Originally posted by vijaydiwakar
                my code is self explanetory.... ...
                y u removed it.........
                let it be there if any one have any qry then i'll solve its problem
                Ok..........
                I'm leaving this site

                I have not removed the code. In fact i have not got the code.

                Comment

                • vijaydiwakar
                  Contributor
                  • Feb 2007
                  • 579

                  #9
                  Originally posted by Shailja
                  I have not removed the code. In fact i have not got the code.
                  No RPoblem read PM

                  Comment

                  • willakawill
                    Top Contributor
                    • Oct 2006
                    • 1646

                    #10
                    Originally posted by vijaydiwakar
                    my code is self explanetory.... ...
                    y u removed it.........
                    let it be there if any one have any qry then i'll solve its problem
                    Ok..........
                    I'm leaving this site
                    TSDN has posting guidelines for anyone posting a question or an answer particularly with reference to questions about assignments. I would like to bring your attention to this paragraph:
                    If anyone does post a full code solution then the solution will be edited by the moderator appropriately and the person will be referred to these guidelines
                    In order for you to remain an active member of TSDN it is vital that you adhere to these guidelines

                    Comment

                    • Shailja
                      New Member
                      • Feb 2007
                      • 123

                      #11
                      Originally posted by vijaydiwakar
                      No RPoblem read PM

                      What is PM

                      Comment

                      Working...