General information
Category:
Coding, syntax & commands
>>What is the most efficient way to check for the existence of a cursor? I have two textboxes, into which the user types values from a table. I have two buttons. Click the first one and it does a SELECT ALL field1, field2... FROM mytable INTO CURSOR mycursor WHERE BETWEEN(field2, box1.value, box2.value). I want the second button to add the single value of box1 to the cursor, without replacing what's already in the cursor, which is what the SELECT...INTO CURSOR does. I figured that if I knew that the cursor was there, I could SELECT and then INSERT - SQL instead. The cursor is the rowsource for a listbox.
>
>Generally, the normal way to check Cursor existence, is USED() function.
>IF USED("mycursor")=.T.
> Select mycursor
> INSERT ....
>ENDIF
Of course! Where is my head today? Thank you again.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only