Finding a record in a cursor

Bob Sneidar bobs at twft.com
Tue Jan 20 11:54:45 EST 2009


Hi all.

I have a bit of a problem here. I am trying to find a value in a  
cursor, and then tell which record it is. I know I can use  
revdatafromquery() and then use lineoffset() to determine the line,  
but I am looking for a unique ID number generated by the SQL Database.  
More precicely, I am looking to move the pointer to the record in the  
cursor whose uniqueID column value is that specific Unique ID.

I perused through the dictionary but I did not see any command for  
positioning the pointer on a record in the cursor. I suppose I could  
walk through each record one at a time or get the whole column as text  
and do a lineoffset().

The idea is to page through the SQL database x records at a time. When  
I update a record I want to re-read the cursor and reposition the  
pointer on the record I was on before the update. I cannot assume that  
more records have not been added since the first cursor was obtained  
(that would be irresponsible programming).

My instinct tells me I am going to have to fudge it. SQL may have  
become the defacto database to work with, but it has some major flaws  
in terms of working with large data sets. It's kind of like politics.  
You may not like the particular party that has control of your state,  
but the other guys have been run out of town and it's all you have to  
work with.

Bob Sneidar
IT Manager
Logos Management
Calvary Chapel CM




More information about the Use-livecode mailing list