If it is not updatable, then you could just do a SELECT...INTO CURSOR crsMyCursor. No need for a SQL View. Then when you close the tables and cursor, the tmep file that was created for the cursor is deleted.
>Thanks Mark! The view is informational retrieval only (not update-able). It gets run once a month, by a single user. I would rather not put it into my massive CREATEVIEWS program since it is used so rarely. I only need to pull two fields out. I'm pretty sure this way will be ok. Thanks for the answer though, you told me just what I needed to know!
>
>>Every time you re-create a SQL view of the same name, the current records in the table that makes up the DBC all get deleted and new records for that view are inserted into the table. So, you you are bloating the table by deleting records and adding new ones. The problem is if you have made the view updatable, then by re-creating the view, you have just deleted all the update properties of the view. You can recreate them with dbsetprop and cursorprop functions, but this will wreak havoc on a multi-user system and is ill-advised.
>>
>>If your concern is structure changes to the source tables of the view, you are still better off having a static view and recreating the views when you change source table structures. Or you could use SDT and let that do all the work for you.
Mark McCasland
Midlothian, TX USA