Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Given a blank page and your own decision...

Status
Not open for further replies.

Nigel Gomm

Programmer
Jan 10, 2001
423
CA

... if you were starting a new VFP9 project that was to be back-end agnostic what would you use; Remote Views, SQL pass thru or cursor adaptors?

I'm starting a new VAR project that i would like to work with any future customer's existing server (most likely SQL Server or mySQL but for the purposes of this discussion it could be anything with an ODBC driver).

Remote Views seem like a good idea but i've often got frustrated with them in the past and reverted to SPT. I've not yet used cursor adaptors in anger.

I have Andy Kramek's piece in MegaFox where he advocates basically a custom wrapper to SPT and that is probably my preferred route.

Any advice, warnings or horror stories?



thanks

Nigel



 
cursor adapters are easy to use and offer dditional events (eg. BeforeCursorFill(), AfterInsert() etc.) you don't have with SPT, SPT offers custom SQL scripts, even non SQL commands. Use cursoradaptors for view like data access and SPT for everyhing else in the mix.

Bye, Olaf.
 
Nigel,

My own preference is always to use SQL pass-through. I have a custom data manager class which handles the repetitive details (I suppose this is the "wrapper" you mentioned), but it's basically just SPT.

But I'm not sure if that's going to help you. This is one of those questions where you'll get a range of answers, all them perfectly valid, but not necessarily relevant to yourself.

We all have our preferred ways of doing things, based on our individual experiences, preferences and prejudices. By all means, we can discuss the pros and cons of the various options, but ultimately you must go with what you feel most comfortable with.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Olaf, just to be clear..... when you say "view" are you suggesting cursor adaptors for read only and SPT for updates or do you mean "remote-view-like" data access?

Mike, as you say preferences etc. Usually for this sort of thing i'm a control freak so my own custom wrapper class is my gut reaction. But i'm also lazy... so if someone has sucessfully used cursor adaptors or remote views for something similar i'd be all ears.

n
 
Use CAs like remote views, updatable. SPT is good for tasks like creating stored procedures, using them, creating or altering databases. And of course complex SQL, especially if you want mass data manipulation with SQL scripts which run server side.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top