> > Yes, you can build views against free tables. It's only the view itself that must be in a DBC, and you can build that on-the-fly.
>
> Oh, I didn't know that! I use views on SQL server only. I don't really know the reason, but I always preferred to use free tables against putting them to the DBC. So I automatically eliminated views since I thought they need a dbc.
>
> I don't have a lot of experience with views. Do you think they have any advantages than using the CursorAdapter class?
>
It's easy to create and maintain Views. A single line would create a read-only View:
CREATE VIEW vTest as Select * From theTable
And three additional lines would make it updatable:
DBSETPROP('vTest',"VIEW","Tables", 'theTable')
DBSETPROP('vTest.pkField',"FIELD","KeyField", .T.)
DBSETPROP('vTest',"VIEW","SendUpdates", .T.)
(Vfp does additional work in the background automatically for you, like creating a field list and so on; you can see the result by running Home()+'\Tools\gendbc\gendbc.PRG' against your test database.)
CursorAdapters are more flexible, say when you want to add and remove many Where filters dynamically at runtime, dynamic field list, etc.
hth
-Stefan