Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Passthrough or Remote Views
Message
From
20/12/2001 03:14:35
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00596114
Message ID:
00596586
Views:
24
<
We are undecided on using remote views or SQL passthrough for accessing the data. I realize that using SQL passthrough I will have the ability to fire stored procedures and can't do this with remote views. Other than that is there a performance benefit from either.

One problem we may run into is that a user may leave the system running on their workstation for an extended period of time. Will either method allow that users system to see changes made by others on the network without requerying the db with either of these methods?

One last thing... In real world example what is the benefit of using stored procedures in a desktop application?>>

1. If you're going to create a scalable client server app then SQL server is the DB you want, but be prepared to learn a lot of extra stuff like DB admin. There is a lot more to SQL server than meets the eye (even to a programmer) and you WILL need to know it eventually. Don't worry SQL server is a lot easier to understand than Oracle and the interface is quite nice. If you're still on a simple LAN then there isn't much reason to move over unless you want to scale up at a later date.

2. George Tasker was right when he said that you'll need to change the way you think about the design of your system, but especially if you have a lot of Parent/Child table interaction on forms..i.e. you use grids or list boxes a lot. The golden rule of good scalable client server apps is that cursors should be avoided. If you do need them (combo's or grids) make them read only/forward only and not persistent (get rid of them once you've used them).

3. To facilitate 2 you'll need to use stored procedures (SPROC's). This does eventually make life easier for you but is a real pain in the backside at first. I always use SQL inserts and updates (which remote views does for you) i.e. in the SPROC i use INSERT INTO XYZ ....or UPDATE XYZ SET... The transaction processing and error handling is generally better.

4. I've not had any experience with VFP and SQL server (lots with VB) so I don't know how good remote views work, but i've not seen many complaints in the short time I've used UT. I would tend to use SQLEXEC more to use my SPROC's. However, I like good old ADO and have stuck with it (I'm using Oracle). I don't think there's much difference in terms of speed from what I can see and there isn't much difference in speed of development, once you're used to it.

5. It's well worth looking at doing a 3 tier app. VFP seems to be really good at doing the COM thing. I'm afraid others will have to tell you more...it's the next thing on my list of thing's to learn.

There's lots of good books and articles out there and you'll get lots of help from this forum (I have..boy did I need it). Personally I've used VB for most of my career and our bible was Robert Vaughns 'Hitchhikers Guide to SQL Server and VB' which is very good if you're going to use ADO...OK it's for VB but the principles are the same. Otherwise David Sussman's 'ADO 2.6 programmers reference' WROX press is an absolute must if you're gonna use ADO (describes in detail every single method, event and property as well as RDO and all that OLAP stuff).

Hope that adds a bit more.

Pablo
Previous
Reply
Map
View

Click here to load this message in the networking platform