Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 To: Stary
  Where is Stary?
 Ljubljana
 Slovenia
 Stary
 Tags
Subject: RE: Updating from cursor to standalone DBF
Thread ID: 202703 Message ID: 203803 # Views: 30 # Ratings: 0
Version: Visual FoxPro 9 Category: Databases, Tables and SQL Server
Date: Saturday, November 15, 2008 11:13:13 PM         
   


> > 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



COMPLETE THREAD
Updating from cursor to standalone DBF Posted by Stary @ 11/9/2008 5:27:19 PM
RE: Updating from cursor to standalone DBF Posted by Mike Gagnon @ 11/9/2008 5:48:37 PM
RE: Updating from cursor to standalone DBF Posted by Stary @ 11/15/2008 10:35:46 PM
RE: Updating from cursor to standalone DBF Posted by Barbara Peisch @ 11/9/2008 9:06:38 PM
RE: Updating from cursor to standalone DBF Posted by Stary @ 11/15/2008 10:53:56 PM
RE: Updating from cursor to standalone DBF Posted by Stefan Wuebbe @ 11/15/2008 11:13:13 PM
RE: Updating from cursor to standalone DBF Posted by Barbara Peisch @ 11/16/2008 3:06:24 AM
RE: Updating from cursor to standalone DBF Posted by Stary @ 11/16/2008 4:26:29 AM
RE: Updating from cursor to standalone DBF Posted by Bernard Bout @ 11/10/2008 4:22:51 PM
RE: Updating from cursor to standalone DBF Posted by Stary @ 11/15/2008 11:01:01 PM
RE: Updating from cursor to standalone DBF Posted by Bernard Bout @ 11/18/2008 3:03:35 AM