Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > GetRows Mystery

Reply
Thread Tools

GetRows Mystery

 
 
Moshe
Guest
Posts: n/a
 
      08-28-2003
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 that returns 1 row. I display the RS info on the page using a
DO-WHILE loop. All fields have values.

I then rerun the same sproc, but this time extract the values into an array
using getrows. I loop through the array and display the content of each
element on screen. However, from the 14 fields, fields 0, 1, 12, 13, & 14
have data and all else are empty.

This is all done in a simple test script, nothing fancy.

I checked carefully that i didn't mix index or anything else silly and well
as have someone else look at it.

I know this is a longshot, but has anyone seen this behavior before? Maybe
some component installed is causing this problem. Just thought I'll ask.

Thanks for any info.


 
Reply With Quote
 
 
 
 
Ray at
Guest
Posts: n/a
 
      08-28-2003
What kind of database? What types of data are those columns? Access/memo?

Ray at work

"Moshe" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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 that returns 1 row. I display the RS info on the page using

a
> DO-WHILE loop. All fields have values.
>
> I then rerun the same sproc, but this time extract the values into an

array
> using getrows. I loop through the array and display the content of each
> element on screen. However, from the 14 fields, fields 0, 1, 12, 13, & 14
> have data and all else are empty.
>
> This is all done in a simple test script, nothing fancy.
>
> I checked carefully that i didn't mix index or anything else silly and

well
> as have someone else look at it.
>
> I know this is a longshot, but has anyone seen this behavior before? Maybe
> some component installed is causing this problem. Just thought I'll ask.
>
> Thanks for any info.
>
>



 
Reply With Quote
 
 
 
 
Moshe
Guest
Posts: n/a
 
      08-28-2003
SQLServer 2000
MDAC 2.7

Fields are varchar or integer.


"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:(E-Mail Removed)...
> What kind of database? What types of data are those columns?

Access/memo?
>
> Ray at work
>
> "Moshe" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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 that returns 1 row. I display the RS info on the page

using
> a
> > DO-WHILE loop. All fields have values.
> >
> > I then rerun the same sproc, but this time extract the values into an

> array
> > using getrows. I loop through the array and display the content of each
> > element on screen. However, from the 14 fields, fields 0, 1, 12, 13, &

14
> > have data and all else are empty.
> >
> > This is all done in a simple test script, nothing fancy.
> >
> > I checked carefully that i didn't mix index or anything else silly and

> well
> > as have someone else look at it.
> >
> > I know this is a longshot, but has anyone seen this behavior before?

Maybe
> > some component installed is causing this problem. Just thought I'll ask.
> >
> > Thanks for any info.
> >
> >

>
>



 
Reply With Quote
 
Ray at
Guest
Posts: n/a
 
      08-28-2003
Post relevant code snippet then please.

Ray at work

"Moshe" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> SQLServer 2000
> MDAC 2.7
>
> Fields are varchar or integer.
>
>
> "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
> news:(E-Mail Removed)...
> > What kind of database? What types of data are those columns?

> Access/memo?
> >
> > Ray at work
> >
> > "Moshe" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > 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 that returns 1 row. I display the RS info on the page

> using
> > a
> > > DO-WHILE loop. All fields have values.
> > >
> > > I then rerun the same sproc, but this time extract the values into an

> > array
> > > using getrows. I loop through the array and display the content of

each
> > > element on screen. However, from the 14 fields, fields 0, 1, 12, 13, &

> 14
> > > have data and all else are empty.
> > >
> > > This is all done in a simple test script, nothing fancy.
> > >
> > > I checked carefully that i didn't mix index or anything else silly and

> > well
> > > as have someone else look at it.
> > >
> > > I know this is a longshot, but has anyone seen this behavior before?

> Maybe
> > > some component installed is causing this problem. Just thought I'll

ask.
> > >
> > > Thanks for any info.
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Moshe
Guest
Posts: n/a
 
      08-28-2003

IN the code below, i try it using the array, then try it using the recorset.
In all, 14 fields are returned.

set rs = cn.execute("spGetInfo 10, 20")

'-- use this portion to display info via Recordset
if not rs.eof then
for i = 0 to 14
response.write i & ": " & rs(i) & "<br>"
next
end if

'-- use this portion to display info via Array
'if not rs.eof then
' ar = rs.getrows
' for i = 0 to ubound(ar,1)
' response.write i & ": " & ar(i,0) & "<br>"
' next
'end if

rs.close
set rs = nothing


 
Reply With Quote
 
Moshe
Guest
Posts: n/a
 
      08-28-2003
I use the getrows approach or the recordset method, not both at the same
time. I keep one of them commented.

"Mike Florio" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Are you doing a movefirst() or requerying the database before looping thru
> the records again ?
>
> "Moshe" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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 that returns 1 row. I display the RS info on the page

using
> a
> > DO-WHILE loop. All fields have values.
> >
> > I then rerun the same sproc, but this time extract the values into an

> array
> > using getrows. I loop through the array and display the content of each
> > element on screen. However, from the 14 fields, fields 0, 1, 12, 13, &

14
> > have data and all else are empty.
> >
> > This is all done in a simple test script, nothing fancy.
> >
> > I checked carefully that i didn't mix index or anything else silly and

> well
> > as have someone else look at it.
> >
> > I know this is a longshot, but has anyone seen this behavior before?

Maybe
> > some component installed is causing this problem. Just thought I'll ask.
> >
> > Thanks for any info.
> >
> >

>
>



 
Reply With Quote
 
Ray at
Guest
Posts: n/a
 
      08-28-2003
This code, after uncommenting it, works as expected for me. ? It's not an
html issue is it, where your results actually are coming back but they're
not displayed because of a missing quote or something, is it? View source?
Just grasping at straws.

Ray at work

"Moshe" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> IN the code below, i try it using the array, then try it using the

recorset.
> In all, 14 fields are returned.
>
> set rs = cn.execute("spGetInfo 10, 20")
>
> '-- use this portion to display info via Recordset
> if not rs.eof then
> for i = 0 to 14
> response.write i & ": " & rs(i) & "<br>"
> next
> end if
>
> '-- use this portion to display info via Array
> 'if not rs.eof then
> ' ar = rs.getrows
> ' for i = 0 to ubound(ar,1)
> ' response.write i & ": " & ar(i,0) & "<br>"
> ' next
> 'end if
>
> rs.close
> set rs = nothing
>
>



 
Reply With Quote
 
Moshe
Guest
Posts: n/a
 
      08-28-2003
No, it's not an html issue or something simple. I think it may have to do
with configuration or some other component on the server. I just thought
someone may have run across this.



"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:(E-Mail Removed)...
> This code, after uncommenting it, works as expected for me. ? It's not

an
> html issue is it, where your results actually are coming back but they're
> not displayed because of a missing quote or something, is it? View

source?
> Just grasping at straws.
>
> Ray at work
>
> "Moshe" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >
> > IN the code below, i try it using the array, then try it using the

> recorset.
> > In all, 14 fields are returned.
> >
> > set rs = cn.execute("spGetInfo 10, 20")
> >
> > '-- use this portion to display info via Recordset
> > if not rs.eof then
> > for i = 0 to 14
> > response.write i & ": " & rs(i) & "<br>"
> > next
> > end if
> >
> > '-- use this portion to display info via Array
> > 'if not rs.eof then
> > ' ar = rs.getrows
> > ' for i = 0 to ubound(ar,1)
> > ' response.write i & ": " & ar(i,0) & "<br>"
> > ' next
> > 'end if
> >
> > rs.close
> > set rs = nothing
> >
> >

>
>



 
Reply With Quote
 
Bob Barrows
Guest
Posts: n/a
 
      08-28-2003
I've never run into this. Can you provide a CREATE TABLE script for your
table along with the stored procedure's creation script and some sample data
so I can test this? It would really help if you provide the sample data in
the form of an insert statement:
INSERT table VALUES(,,,,)

Bob Barrows
Moshe wrote:
> No, it's not an html issue or something simple. I think it may have
> to do with configuration or some other component on the server. I
> just thought someone may have run across this.
>
>
>
> "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in
> message news:(E-Mail Removed)...
>> This code, after uncommenting it, works as expected for me. ? It's
>> not an html issue is it, where your results actually are coming back
>> but they're not displayed because of a missing quote or something,
>> is it? View source? Just grasping at straws.
>>
>> Ray at work
>>
>> "Moshe" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>>
>>> IN the code below, i try it using the array, then try it using the
>>> recorset. In all, 14 fields are returned.
>>>
>>> set rs = cn.execute("spGetInfo 10, 20")
>>>
>>> '-- use this portion to display info via Recordset
>>> if not rs.eof then
>>> for i = 0 to 14
>>> response.write i & ": " & rs(i) & "<br>"
>>> next
>>> end if
>>>
>>> '-- use this portion to display info via Array
>>> 'if not rs.eof then
>>> ' ar = rs.getrows
>>> ' for i = 0 to ubound(ar,1)
>>> ' response.write i & ": " & ar(i,0) & "<br>"
>>> ' next
>>> 'end if
>>>
>>> rs.close
>>> set rs = nothing



 
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove items from GetRows array Patrick G. ASP General 2 02-27-2004 02:09 PM
JScript & GetRows Harag ASP General 4 12-28-2003 05:22 PM
GetRows Random <td></td> Output Jim ASP General 1 11-22-2003 06:51 AM
Difference between getrows and getstring Crane Linkledder ASP General 11 10-30-2003 02:04 PM
Using GetRows() Croney69 ASP General 5 07-28-2003 08:50 PM



Advertisments