Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Views vs cursoradapters
Message
From
16/06/2015 04:44:51
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
15/06/2015 13:28:29
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01621008
Message ID:
01621024
Views:
82
>>Hi,
>>
>>I haven't worked with Foxpro for years and I'm presented with an programming issue. I'm not if because I have just been using other tech for so long that I have forgotten how to think in Foxpro or there are real reasons to use a cursoradapter.
>>
>>So the question is:
>>
>>If you are only required to work with one data source such as sqlserver (I realize cursoradapters can access other data sources). Is there an advantage to using cursoradapters over just creating a standard sqlserver view? The sqlserver views are update-able.
>>
>>Johnf
>
>Thomas makes a good case for cursor adapters,
>However, if your SQL Server data will be used in other applications (e.g.Crystal Reports or SSRS) outside of VFP, the SQL Server views are very handy.

That's independent from their use in VFP. True, there may be some advantage to not having to write the same SQL statement twice, but it's fairly minor. Also, nothing stops us from connecting a CA to a SQL-side view, it's only a bit harder to make that updatable automatically.

The main difference between CA and views is, for me, that there's no need to maintain a dbc for views (and specially the named connection in it - dang, I have to have that specific instance of the database, on a server with that exact name... sheesh, the database name changes several times a day). Next, all the before* and after* events in CA which are just out of reach in a view. Also, in a CA you can tweak the where clause at will (just preserve your original statement for later) and just requery(), whereas in a view you are limited to exactly the parameters which were defined with the view.

Whatever a view can do, CA does, plus twice as much with half the overhead.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform