>I am new to this SQL stuff, and in need of advice. I am creating an SQL statement INTO a cursor. However, that cursor is read-only, and I would like to alter the information. I prefer to use a cursor, because it cleans up so easily. What is the best way to create an updateable cursor using SQL, or should I just do it the old fashioned way and scan through the table and build my own cursor (which is updateable)
>
>Thanks,
>Marcus.
As Evan said "use dbf() ... again" does the trick. But you should create a true cursor first :
select .... ;
where .t. and lOtherExpressionIfAny ;
into cursor myTemp
select .... ;
where ... ;
into cursor myTemp nofilter
use dbf("myTemp") in 0 again alias myUpdatable
use in "myTemp"
select myUpdatable
MultiselectGrid class in files\classes section uses this technique :)
PS: No matter the size is cursor would be created on disk. You may not find it using explorer or file() but it's there I assure you (allocated). To easily make it evident just create an index on a field.
Cetin