Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   GetRows Mystery (http://www.velocityreviews.com/forums/t789772-getrows-mystery.html)

Moshe 08-28-2003 05:52 PM

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 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.



Ray at 08-28-2003 05:58 PM

Re: GetRows Mystery
 
What kind of database? What types of data are those columns? Access/memo?

Ray at work

"Moshe" <udeleng@REMOVEMEyahoo.com> wrote in message
news:eoFN40YbDHA.880@TK2MSFTNGP09.phx.gbl...
> 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.
>
>




Moshe 08-28-2003 06:04 PM

Re: GetRows Mystery
 
SQLServer 2000
MDAC 2.7

Fields are varchar or integer.


"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:uR2Ry3YbDHA.1808@TK2MSFTNGP11.phx.gbl...
> What kind of database? What types of data are those columns?

Access/memo?
>
> Ray at work
>
> "Moshe" <udeleng@REMOVEMEyahoo.com> wrote in message
> news:eoFN40YbDHA.880@TK2MSFTNGP09.phx.gbl...
> > 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.
> >
> >

>
>




Ray at 08-28-2003 06:07 PM

Re: GetRows Mystery
 
Post relevant code snippet then please.

Ray at work

"Moshe" <udeleng@REMOVEMEyahoo.com> wrote in message
news:%239y6v7YbDHA.1488@TK2MSFTNGP12.phx.gbl...
> SQLServer 2000
> MDAC 2.7
>
> Fields are varchar or integer.
>
>
> "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
> news:uR2Ry3YbDHA.1808@TK2MSFTNGP11.phx.gbl...
> > What kind of database? What types of data are those columns?

> Access/memo?
> >
> > Ray at work
> >
> > "Moshe" <udeleng@REMOVEMEyahoo.com> wrote in message
> > news:eoFN40YbDHA.880@TK2MSFTNGP09.phx.gbl...
> > > 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.
> > >
> > >

> >
> >

>
>




Moshe 08-28-2003 06:18 PM

Re: GetRows Mystery
 

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



Moshe 08-28-2003 06:41 PM

Re: GetRows Mystery
 
I use the getrows approach or the recordset method, not both at the same
time. I keep one of them commented.

"Mike Florio" <mike@micro-point.com> wrote in message
news:vkshslj93fvmcf@corp.supernews.com...
> Are you doing a movefirst() or requerying the database before looping thru
> the records again ?
>
> "Moshe" <udeleng@REMOVEMEyahoo.com> wrote in message
> news:eoFN40YbDHA.880@TK2MSFTNGP09.phx.gbl...
> > 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.
> >
> >

>
>




Ray at 08-28-2003 06:52 PM

Re: GetRows Mystery
 
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" <udeleng@REMOVEMEyahoo.com> wrote in message
news:OL1FvDZbDHA.2904@TK2MSFTNGP11.phx.gbl...
>
> 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
>
>




Moshe 08-28-2003 06:58 PM

Re: GetRows Mystery
 
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:OaJqCWZbDHA.3768@tk2msftngp13.phx.gbl...
> 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" <udeleng@REMOVEMEyahoo.com> wrote in message
> news:OL1FvDZbDHA.2904@TK2MSFTNGP11.phx.gbl...
> >
> > 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
> >
> >

>
>




Bob Barrows 08-28-2003 08:05 PM

Re: GetRows Mystery
 
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:OaJqCWZbDHA.3768@tk2msftngp13.phx.gbl...
>> 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" <udeleng@REMOVEMEyahoo.com> wrote in message
>> news:OL1FvDZbDHA.2904@TK2MSFTNGP11.phx.gbl...
>>>
>>> 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





All times are GMT. The time now is 10:59 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.