session("var")= rs.getRows()

Discussion in 'ASP General' started by bajopalabra, Nov 2, 2005.

  1. bajopalabra

    bajopalabra Guest

    hi
    session("myVar") = rs.getRows( )
    don't work when number of records
    is greater than 10

    does anybody know WHY ???

    is it a Session object limitation ???

    thanks
    --
    atte, Hernán
     
    bajopalabra, Nov 2, 2005
    #1
    1. Advertising

  2. bajopalabra wrote:
    > hi
    > session("myVar") = rs.getRows( )
    > don't work when number of records
    > is greater than 10
    >
    > does anybody know WHY ???
    >
    > is it a Session object limitation ???
    >

    What does "don't work" mean? Error message? Nothing happens? Try to describe
    the symptoms of your problem without using the words "does not work".
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Nov 2, 2005
    #2
    1. Advertising

  3. bajopalabra

    bajopalabra Guest

    sure, thanks
    (excuse me about my english)
    all the session variable are cleaned
    that is, session is lost

    only 1 user can get session("aVar")= rs.getRows( )
    the rest, will get a single session("id")= rs("user_id)

    thanks again

    --
    atte, Hernán

    "Bob Barrows [MVP]" <> escribió en el mensaje
    news:...
    > bajopalabra wrote:
    > > hi
    > > session("myVar") = rs.getRows( )
    > > don't work when number of records
    > > is greater than 10
    > >
    > > does anybody know WHY ???
    > >
    > > is it a Session object limitation ???
    > >

    > What does "don't work" mean? Error message? Nothing happens? Try to

    describe
    > the symptoms of your problem without using the words "does not work".
    > --
    > Microsoft MVP -- ASP/ASP.NET
    > Please reply to the newsgroup. The email account listed in my From
    > header is my spam trap, so I don't check it very often. You will get a
    > quicker response by posting to the newsgroup.
    >
    >
     
    bajopalabra, Nov 2, 2005
    #3
  4. Is this something you can reliably reproduce? IE, can you modify the
    getrows() statement so it only uses 9 records in the resulting array
    session("aVar")= rs.getRows(9)
    and have the problem go away?

    And then change it to
    session("aVar")= rs.getRows(10)
    to cause the problem to reappear?

    Bob Barrows


    bajopalabra wrote:
    > sure, thanks
    > (excuse me about my english)
    > all the session variable are cleaned
    > that is, session is lost
    >
    > only 1 user can get session("aVar")= rs.getRows( )
    > the rest, will get a single session("id")= rs("user_id)
    >
    > thanks again
    >
    > --
    > atte, Hernán
    >
    > "Bob Barrows [MVP]" <> escribió en el mensaje
    > news:...
    >> bajopalabra wrote:
    >>> hi
    >>> session("myVar") = rs.getRows( )
    >>> don't work when number of records
    >>> is greater than 10
    >>>
    >>> does anybody know WHY ???
    >>>
    >>> is it a Session object limitation ???
    >>>

    >> What does "don't work" mean? Error message? Nothing happens? Try to
    >> describe the symptoms of your problem without using the words "does
    >> not work". --
    >> Microsoft MVP -- ASP/ASP.NET
    >> Please reply to the newsgroup. The email account listed in my From
    >> header is my spam trap, so I don't check it very often. You will get
    >> a quicker response by posting to the newsgroup.


    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Nov 2, 2005
    #4
  5. Oh! And if you have "on error resume next" in your code, comment it out
    until you figure out what the real problem is.


    bajopalabra wrote:
    > sure, thanks
    > (excuse me about my english)
    > all the session variable are cleaned
    > that is, session is lost
    >
    > only 1 user can get session("aVar")= rs.getRows( )
    > the rest, will get a single session("id")= rs("user_id)
    >
    > thanks again
    >
    > --
    > atte, Hernán
    >
    > "Bob Barrows [MVP]" <> escribió en el mensaje
    > news:...
    >> bajopalabra wrote:
    >>> hi
    >>> session("myVar") = rs.getRows( )
    >>> don't work when number of records
    >>> is greater than 10
    >>>
    >>> does anybody know WHY ???
    >>>
    >>> is it a Session object limitation ???
    >>>

    >> What does "don't work" mean? Error message? Nothing happens? Try to
    >> describe the symptoms of your problem without using the words "does
    >> not work". --
    >> Microsoft MVP -- ASP/ASP.NET
    >> Please reply to the newsgroup. The email account listed in my From
    >> header is my spam trap, so I don't check it very often. You will get
    >> a quicker response by posting to the newsgroup.


    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Nov 2, 2005
    #5
  6. bajopalabra

    bajopalabra Guest

    i have no "on error" statement

    i simply touch the table in the database
    to get the number of records i desire
    and then i execute the asp file

    i test with 1 , 2 , .... thru 9
    and, when i insert the 10th row in the table :
    - the asp file get 10 rows
    - But the "session array" is empty
    - 2 other "single session vars" previously created
    are empty too ...

    now, i delete a row :
    - the asp file get 9 rows
    - the "session array" has correct values
    - 2 other "single session vars" hace correct values

    each row has 55 bytes

    i tried ( with 10 or more rows ) :

    dim aux( 20, 20 )
    aux= rs.getRows ( )
    session("arrayVar")= aux

    but the effect is the same

    --
    atte, Hernán

    "Bob Barrows [MVP]" <> escribió en el mensaje
    news:uFRT$%...
    > Is this something you can reliably reproduce? IE, can you modify the
    > getrows() statement so it only uses 9 records in the resulting array
    > session("aVar")= rs.getRows(9)
    > and have the problem go away?
    >
    > And then change it to
    > session("aVar")= rs.getRows(10)
    > to cause the problem to reappear?
    >
    > Bob Barrows
    >
    >
    > bajopalabra wrote:
    > > sure, thanks
    > > (excuse me about my english)
    > > all the session variable are cleaned
    > > that is, session is lost
    > >
    > > only 1 user can get session("aVar")= rs.getRows( )
    > > the rest, will get a single session("id")= rs("user_id)
    > >
    > > thanks again
    > >
    > > --
    > > atte, Hernán
    > >
    > > "Bob Barrows [MVP]" <> escribió en el mensaje
    > > news:...
    > >> bajopalabra wrote:
    > >>> hi
    > >>> session("myVar") = rs.getRows( )
    > >>> don't work when number of records
    > >>> is greater than 10
    > >>>
    > >>> does anybody know WHY ???
    > >>>
    > >>> is it a Session object limitation ???
    > >>>
    > >> What does "don't work" mean? Error message? Nothing happens? Try to
    > >> describe the symptoms of your problem without using the words "does
    > >> not work". --
    > >> Microsoft MVP -- ASP/ASP.NET
    > >> Please reply to the newsgroup. The email account listed in my From
    > >> header is my spam trap, so I don't check it very often. You will get
    > >> a quicker response by posting to the newsgroup.

    >
    > --
    > Microsoft MVP -- ASP/ASP.NET
    > Please reply to the newsgroup. The email account listed in my From
    > header is my spam trap, so I don't check it very often. You will get a
    > quicker response by posting to the newsgroup.
    >
    >
     
    bajopalabra, Nov 2, 2005
    #6
  7. Sorry, I've never seen anything like this. Here is my attempt to reproduce
    the symptoms. It works fine for me. How about you?

    <%
    if len(Request.Form("rows"))=0 then
    session("test1") = "Here I am"
    session("test2") = "I am here too"
    end if
    dim rs, i
    set rs=createobject("adodb.recordset")
    rs.Fields.append "id",3
    rs.Fields.append "col1",200,50
    rs.Fields.append "col2",200,50
    rs.Open
    for i = 1 to 15
    rs.AddNew array("id","col1","col2"), _
    array(i,"this is some test data ","this is some more test data")
    next
    i=Request.Form("rows")
    if len(i)=0 then i = 5
    'Response.Write rs.RecordCount
    rs.MoveFirst
    session("data") = rs.GetRows(i)
    rs.Close

    %>
    <html><body><form method="post">
    Enter rows to store:&nbsp;<input name="rows" type="text" value="<%=i%>"><BR>
    Session("test1"): <%=Session("test1")%><BR>
    Session("test2"): <%=Session("test2")%><BR>
    Session("data"): <BR>
    Contains <%=ubound(session("data"),2) + 1%> records<BR>
    First record: <%=Session("data")(0,0) & " - " & Session("data")(1,0)%><BR>
    <INPUT type="submit" value="Submit" id=submit1 name=submit1>
    </form></body></html>




    bajopalabra wrote:
    > i have no "on error" statement
    >
    > i simply touch the table in the database
    > to get the number of records i desire
    > and then i execute the asp file
    >
    > i test with 1 , 2 , .... thru 9
    > and, when i insert the 10th row in the table :
    > - the asp file get 10 rows
    > - But the "session array" is empty
    > - 2 other "single session vars" previously created
    > are empty too ...
    >
    > now, i delete a row :
    > - the asp file get 9 rows
    > - the "session array" has correct values
    > - 2 other "single session vars" hace correct values
    >
    > each row has 55 bytes
    >
    > i tried ( with 10 or more rows ) :
    >
    > dim aux( 20, 20 )
    > aux= rs.getRows ( )
    > session("arrayVar")= aux
    >
    > but the effect is the same
    >
    > --
    > atte, Hernán
    >
    > "Bob Barrows [MVP]" <> escribió en el mensaje
    > news:uFRT$%...
    >> Is this something you can reliably reproduce? IE, can you modify the
    >> getrows() statement so it only uses 9 records in the resulting array
    >> session("aVar")= rs.getRows(9)
    >> and have the problem go away?
    >>
    >> And then change it to
    >> session("aVar")= rs.getRows(10)
    >> to cause the problem to reappear?
    >>
    >> Bob Barrows
    >>
    >>
    >> bajopalabra wrote:
    >>> sure, thanks
    >>> (excuse me about my english)
    >>> all the session variable are cleaned
    >>> that is, session is lost
    >>>
    >>> only 1 user can get session("aVar")= rs.getRows( )
    >>> the rest, will get a single session("id")= rs("user_id)
    >>>
    >>> thanks again
    >>>
    >>> --
    >>> atte, Hernán
    >>>
    >>> "Bob Barrows [MVP]" <> escribió en el
    >>> mensaje news:...
    >>>> bajopalabra wrote:
    >>>>> hi
    >>>>> session("myVar") = rs.getRows( )
    >>>>> don't work when number of records
    >>>>> is greater than 10
    >>>>>
    >>>>> does anybody know WHY ???
    >>>>>
    >>>>> is it a Session object limitation ???
    >>>>>
    >>>> What does "don't work" mean? Error message? Nothing happens? Try to
    >>>> describe the symptoms of your problem without using the words "does
    >>>> not work". --
    >>>> Microsoft MVP -- ASP/ASP.NET
    >>>> Please reply to the newsgroup. The email account listed in my From
    >>>> header is my spam trap, so I don't check it very often. You will
    >>>> get a quicker response by posting to the newsgroup.

    >>
    >> --
    >> Microsoft MVP -- ASP/ASP.NET
    >> Please reply to the newsgroup. The email account listed in my From
    >> header is my spam trap, so I don't check it very often. You will get
    >> a quicker response by posting to the newsgroup.


    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Nov 2, 2005
    #7
  8. bajopalabra

    bajopalabra Guest

    ok, i suspect we have something
    try changing

    session("data") = rs.GetRows( i )
    for
    session("data") = rs.GetRows( )

    I WAS ommiting the "rec count" paramenter of GetRows
    should it be that , right ?

    i go to find out now
    why existing session var are cleaned
    and then i post the result

    thanks you much,
    Bob

    --
    atte, Hernán

    "Bob Barrows [MVP]" <> escribió en el mensaje
    news:e5obmt%...
    > Sorry, I've never seen anything like this. Here is my attempt to reproduce
    > the symptoms. It works fine for me. How about you?
    >
    > <%
    > if len(Request.Form("rows"))=0 then
    > session("test1") = "Here I am"
    > session("test2") = "I am here too"
    > end if
    > dim rs, i
    > set rs=createobject("adodb.recordset")
    > rs.Fields.append "id",3
    > rs.Fields.append "col1",200,50
    > rs.Fields.append "col2",200,50
    > rs.Open
    > for i = 1 to 15
    > rs.AddNew array("id","col1","col2"), _
    > array(i,"this is some test data ","this is some more test data")
    > next
    > i=Request.Form("rows")
    > if len(i)=0 then i = 5
    > 'Response.Write rs.RecordCount
    > rs.MoveFirst
    > session("data") = rs.GetRows(i)
    > rs.Close
    >
    > %>
    > <html><body><form method="post">
    > Enter rows to store:&nbsp;<input name="rows" type="text"

    value="<%=i%>"><BR>
    > Session("test1"): <%=Session("test1")%><BR>
    > Session("test2"): <%=Session("test2")%><BR>
    > Session("data"): <BR>
    > Contains <%=ubound(session("data"),2) + 1%> records<BR>
    > First record: <%=Session("data")(0,0) & " - " & Session("data")(1,0)%><BR>
    > <INPUT type="submit" value="Submit" id=submit1 name=submit1>
    > </form></body></html>
    >
    >
    >
    >
    > bajopalabra wrote:
    > > i have no "on error" statement
    > >
    > > i simply touch the table in the database
    > > to get the number of records i desire
    > > and then i execute the asp file
    > >
    > > i test with 1 , 2 , .... thru 9
    > > and, when i insert the 10th row in the table :
    > > - the asp file get 10 rows
    > > - But the "session array" is empty
    > > - 2 other "single session vars" previously created
    > > are empty too ...
    > >
    > > now, i delete a row :
    > > - the asp file get 9 rows
    > > - the "session array" has correct values
    > > - 2 other "single session vars" hace correct values
    > >
    > > each row has 55 bytes
    > >
    > > i tried ( with 10 or more rows ) :
    > >
    > > dim aux( 20, 20 )
    > > aux= rs.getRows ( )
    > > session("arrayVar")= aux
    > >
    > > but the effect is the same
    > >
    > > --
    > > atte, Hernán
    > >
    > > "Bob Barrows [MVP]" <> escribió en el mensaje
    > > news:uFRT$%...
    > >> Is this something you can reliably reproduce? IE, can you modify the
    > >> getrows() statement so it only uses 9 records in the resulting array
    > >> session("aVar")= rs.getRows(9)
    > >> and have the problem go away?
    > >>
    > >> And then change it to
    > >> session("aVar")= rs.getRows(10)
    > >> to cause the problem to reappear?
    > >>
    > >> Bob Barrows
    > >>
    > >>
    > >> bajopalabra wrote:
    > >>> sure, thanks
    > >>> (excuse me about my english)
    > >>> all the session variable are cleaned
    > >>> that is, session is lost
    > >>>
    > >>> only 1 user can get session("aVar")= rs.getRows( )
    > >>> the rest, will get a single session("id")= rs("user_id)
    > >>>
    > >>> thanks again
    > >>>
    > >>> --
    > >>> atte, Hernán
    > >>>
    > >>> "Bob Barrows [MVP]" <> escribió en el
    > >>> mensaje news:...
    > >>>> bajopalabra wrote:
    > >>>>> hi
    > >>>>> session("myVar") = rs.getRows( )
    > >>>>> don't work when number of records
    > >>>>> is greater than 10
    > >>>>>
    > >>>>> does anybody know WHY ???
    > >>>>>
    > >>>>> is it a Session object limitation ???
    > >>>>>
    > >>>> What does "don't work" mean? Error message? Nothing happens? Try to
    > >>>> describe the symptoms of your problem without using the words "does
    > >>>> not work". --
    > >>>> Microsoft MVP -- ASP/ASP.NET
    > >>>> Please reply to the newsgroup. The email account listed in my From
    > >>>> header is my spam trap, so I don't check it very often. You will
    > >>>> get a quicker response by posting to the newsgroup.
    > >>
    > >> --
    > >> Microsoft MVP -- ASP/ASP.NET
    > >> Please reply to the newsgroup. The email account listed in my From
    > >> header is my spam trap, so I don't check it very often. You will get
    > >> a quicker response by posting to the newsgroup.

    >
    > --
    > Microsoft MVP -- ASP/ASP.NET
    > Please reply to the newsgroup. The email account listed in my From
    > header is my spam trap, so I don't check it very often. You will get a
    > quicker response by posting to the newsgroup.
    >
    >
     
    bajopalabra, Nov 2, 2005
    #8
  9. bajopalabra wrote:
    > ok, i suspect we have something
    > try changing
    >
    > session("data") = rs.GetRows( i )
    > for
    > session("data") = rs.GetRows( )
    >

    OK, I made the change. Still no problem:
    <%
    if len(Request.Form("rows"))=0 then
    session("test1") = "Here I am"
    session("test2") = "I am here too"
    end if
    dim rs, i,j
    i=Request.Form("rows")
    if len(i)=0 then i = 5
    set rs=createobject("adodb.recordset")
    rs.Fields.append "id",3
    rs.Fields.append "col1",200,50
    rs.Fields.append "col2",200,50
    rs.Open
    for j = 1 to i
    rs.AddNew array("id","col1","col2"), _
    array(j,"this is some test data ","this is some more test data")
    next
    'Response.Write rs.RecordCount
    rs.MoveFirst
    session("data") = rs.GetRows()
    rs.Close

    %>
    <html><body><form method="post">
    Enter rows to store:&nbsp;<input name="rows" type="text" value="<%=i%>"><BR>
    Session("test1"): <%=Session("test1")%><BR>
    Session("test2"): <%=Session("test2")%><BR>
    Session("data"): <BR>
    Contains <%=ubound(session("data"),2) + 1%> records<BR>
    First record: <%=Session("data")(0,0) & " - " & Session("data")(1,0)%><BR>
    <INPUT type="submit" value="Submit" id=submit1 name=submit1>
    </form></body></html>

    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Nov 2, 2005
    #9
  10. bajopalabra

    Roland Hall Guest

    "Bob Barrows [MVP]" wrote in message
    news:...
    : bajopalabra wrote:
    : > hi
    : > session("myVar") = rs.getRows( )
    : > don't work when number of records
    : > is greater than 10
    : >
    : > does anybody know WHY ???
    : >
    : > is it a Session object limitation ???
    : >
    : What does "don't work" mean?

    bad gramma'
     
    Roland Hall, Nov 4, 2005
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alvin Bruney

    Threads.. Session var lost, App var ok

    Alvin Bruney, Dec 2, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    373
    rooster575
    Dec 2, 2003
  2. thomson
    Replies:
    10
    Views:
    2,510
    Eliyahu Goldin
    Jun 20, 2005
  3. thomson
    Replies:
    0
    Views:
    396
    thomson
    Jun 20, 2005
  4. Fred
    Replies:
    3
    Views:
    330
    Alf P. Steinbach
    Aug 10, 2003
  5. Laphan
    Replies:
    11
    Views:
    322
    StephenMcC
    Nov 22, 2004
Loading...

Share This Page