Getrows = funny result

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Getrows = funny result

    Hi,

    I want to use Getrows on a recordset.

    using 3 recordsets:

    set rs2003 = Server.CreateObject("ADODB.recordset")
    set rs2002 = Server.CreateObject("ADODB.recordset")
    ....
    ---like this-------------------
    Dim mycommand2003
    set mycommand2003 = Server.CreateObject("ADODB.Command")
    with mycommand2003
    .Activeconnection=cnnSimple
    .CommandText = " xxxxxxxxxxxxxxxxxxxxxx"
    end with
    set rs2003 = mycommand2003.execute
    ---------------------- > everythink ok


    so I can work with all the data by using "rs2003.Fields("xxx")"
    ---working with recordset.

    Now before the first one, I add now : arrs2003 = rs2003.getRows()
    only this simple row.
    BUT : now I don't get no data anymore for the other recordsets ! Funny
    !

    Does some one had already something like this...
    Please I will be happy for every answer ...

    Ann
    Anorlu Guest

  2. Similar Questions and Discussions

    1. getrows breaks if WHERE in sql
      Hello all willing to assist. This should be simple but it's killing me. I have this query (Access2k): strsql="SELECT M.NewRingNum " strsql=...
    2. Paging and getrows
      Assuming the code below, whats the most efficient way to get the actual record count as the full array count doesnt exist :-) I want to keep the...
    3. GetRows and ASP 2.0
      Hello, Are there a lot of differences between ASP 2.0 and 3.0. My development environment is a bit more up to date then my production system. I...
    4. GetRows Mystery
      I'm facing an odd behavior in using the GetRows Method. I'm not sure what's causing it because it has been working fine until now. I have a sproc...
    5. Using GetRows()
      I am getting information out of a table to place into to an Array. rs=DataConn.Execute(strSQL) At this point I place it into the array ...
  3. #2

    Default Re: Getrows = funny result

    What happens when you try to get data out of the other recordsets?

    Also,

    .Activeconnection=cnnSimple

    should be:

    Set .ActiveConnection = cnnSimple

    At the moment you are assigning the value of the .ConnectionString property
    of the cnnSimple object to the .ActiveConnection property of the Command
    object (since .ConnectionString() is the default property). Instead, to
    utilise connection pooling, you want to assign the actual ConnectionObject
    to the .ActiveConnection Property.

    Cheers
    Ken

    "Anorlu" <anorlu@hotmail.com> wrote in message
    news:c529aab0.0310170700.4adee8af@posting.google.c om...
    : Hi,
    :
    : I want to use Getrows on a recordset.
    :
    : using 3 recordsets:
    :
    : set rs2003 = Server.CreateObject("ADODB.recordset")
    : set rs2002 = Server.CreateObject("ADODB.recordset")
    : ...
    : ---like this-------------------
    : Dim mycommand2003
    : set mycommand2003 = Server.CreateObject("ADODB.Command")
    : with mycommand2003
    : .Activeconnection=cnnSimple
    : .CommandText = " xxxxxxxxxxxxxxxxxxxxxx"
    : end with
    : set rs2003 = mycommand2003.execute
    : ---------------------- > everythink ok
    :
    :
    : so I can work with all the data by using "rs2003.Fields("xxx")"
    : ---working with recordset.
    :
    : Now before the first one, I add now : arrs2003 = rs2003.getRows()
    : only this simple row.
    : BUT : now I don't get no data anymore for the other recordsets ! Funny
    : !
    :
    : Does some one had already something like this...
    : Please I will be happy for every answer ...
    :
    : Ann


    Ken Schaefer Guest

  4. #3

    Default Re: Getrows = funny result

    I got it, after e Getrows, I have to use Movefirst, because after a
    Getrows, it's EOF...

    mmm ok that's not good, as I don't want use Movefirst,

    --> Movefirst reopen the recordset, the time consumption increase.

    I want to work with the recordset and the tables at the same time.
    Similar as if I create a clone. But the clone methode does not
    working.

    There I always get :

    set rs2003b = rs2003.clone
    if rs2003b.EOF then
    REsponse.write ("Error rs2003b.EOF")
    end if

    And I get : Error rs2003b.EOF
    Anorlu Guest

  5. #4

    Default Re: Getrows = funny result

    Hi,

    Once you have called .GetRows, your data is in the array. Why do you need to
    use the Recordset?

    I thought you were talking about *other* recordsets.

    If you want to call .MoveFirst on the same recordset you just called
    ..GetRows on, then you need a scrollable cursor (eg adOpenStatic, or
    adOpenKeyset), but the defeats the whole purpose of .GetRows

    Cheers
    Ken


    "Anorlu" <anorlu@hotmail.com> wrote in message
    news:c529aab0.0310200158.478ba617@posting.google.c om...
    : I got it, after e Getrows, I have to use Movefirst, because after a
    : Getrows, it's EOF...
    :
    : mmm ok that's not good, as I don't want use Movefirst,
    :
    : --> Movefirst reopen the recordset, the time consumption increase.
    :
    : I want to work with the recordset and the tables at the same time.
    : Similar as if I create a clone. But the clone methode does not
    : working.
    :
    : There I always get :
    :
    : set rs2003b = rs2003.clone
    : if rs2003b.EOF then
    : REsponse.write ("Error rs2003b.EOF")
    : end if
    :
    : And I get : Error rs2003b.EOF


    Ken Schaefer Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139