Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > session("var")= rs.getRows()

Reply
Thread Tools

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

 
 
bajopalabra
Guest
Posts: n/a
 
      11-02-2005
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


 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      11-02-2005
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.


 
Reply With Quote
 
 
 
 
bajopalabra
Guest
Posts: n/a
 
      11-02-2005
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]" <(E-Mail Removed)> escribió en el mensaje
news:(E-Mail Removed)...
> 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.
>
>



 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      11-02-2005
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]" <(E-Mail Removed)> escribió en el mensaje
> news:(E-Mail Removed)...
>> 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.


 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      11-02-2005
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]" <(E-Mail Removed)> escribió en el mensaje
> news:(E-Mail Removed)...
>> 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.


 
Reply With Quote
 
bajopalabra
Guest
Posts: n/a
 
      11-02-2005
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]" <(E-Mail Removed)> escribió en el mensaje
news:uFRT$%(E-Mail Removed)...
> 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]" <(E-Mail Removed)> escribió en el mensaje
> > news:(E-Mail Removed)...
> >> 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.
>
>



 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      11-02-2005
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]" <(E-Mail Removed)> escribió en el mensaje
> news:uFRT$%(E-Mail Removed)...
>> 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]" <(E-Mail Removed)> escribió en el
>>> mensaje news:(E-Mail Removed)...
>>>> 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.


 
Reply With Quote
 
bajopalabra
Guest
Posts: n/a
 
      11-02-2005
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]" <(E-Mail Removed)> escribió en el mensaje
news:e5obmt%(E-Mail Removed)...
> 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]" <(E-Mail Removed)> escribió en el mensaje
> > news:uFRT$%(E-Mail Removed)...
> >> 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]" <(E-Mail Removed)> escribió en el
> >>> mensaje news:(E-Mail Removed)...
> >>>> 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.
>
>



 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      11-02-2005
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.


 
Reply With Quote
 
Roland Hall
Guest
Posts: n/a
 
      11-04-2005
"Bob Barrows [MVP]" wrote in message
news:(E-Mail Removed)...
: 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'


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments