comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » DataMiner - Number of rows in a table?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
DataMiner - Number of rows in a table? [message #15782] Mon, 14 June 1999 00:00 Go to previous message
Calvin King is currently offline  Calvin King
Messages: 3
Registered: June 1999
Junior Member
Fellow IDL Users:

I checked in the 'IDL DataMiner Guide' to see if there is a simple way
to determine the number of rows in a table and I couldn't find any.
Hence, I am using the 'IDLdbRecordset::MoveCursor' function to count the
number of rows as follows:
status = objRS->MoveCursor(/First)
count = 1
status = objRS->MoveCursor(/Next)
WHILE (status EQ 1) DO BEGIN
count = count + 1
status = objRS->MoveCursor(/Next)
ENDWHILE
I am using the value of 'count' from above to initialize an array, and
then reading into this array values from a table as follows:
status = objRS->MoveCursor(/First)
x = FLTARR(count)
y = FLTARR(count)
FOR I = 0, count-1 DO BEGIN
x[i] = objRS->GetField(0)
y[i] = objRS->GetField(1)
status = objRS->MoveCursor(/Next)
ENDFOR

Is there a better way (takes less time) to carry out the above task?
BTW, for my application the value of count is often > 10K.

Thanks for any ideas or suggestions!

Calvin
Email: cking@sandia.gov
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Automatic structure definition..
Next Topic: Re: Importing nested structures?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:33:50 PDT 2025

Total time taken to generate the page: 0.00362 seconds