On 7/28/06, Mike yearwood <[EMAIL PROTECTED]> wrote:
Hi Michael
> Man-wai CHANG wrote:
> >> For those who integrate VFP with SQL Server...would you set up a SQL
> >> Server view and then have a stored proc that returned the view, or would
> >> you just write the SQL Select code into the stored proc and return
> >> that?  I'm unfamiliar with how parameterized views work in SQL
> >> Server...I'm hoping it's as easy as in Fox, but I doubt it will be.  ;-)
> >>
> >
> > Some said stored procedures are more secured than allowing direct sql
> > statements.
> >
> I've heard that as well.

Definately true.  You have much more control over who can do what.
e.g. you deny the client access to the database only via your SPs.  A
huge advantage is that if your database structure changes you don't
need to re-compile the 10 apps that have hard-coded structures :)

I had reason to run a test of SPs vs SQL. If the SP is doing the same
thing as a simple query, you're not going to gain anything by using
the SP. In my test the straight query was 2x faster.

That's impossible I'm afraid.
- Calling a SP requires you to send less data.
- SPs are pre-compiled.
- The execution plans for the SQL is saved.

--
Paul


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to