There are other benefits to using stored procedures:
1) security - Because of the way that ownership chains work, you can let a user access a table through a stored procedure but deny them access to the table directly.
2) abstraction - The stored procedure hides the database schema from the application, easing maintenance.
-Mike
>I have a lot of queries that are built inside the vfp front end, very simple example here with how I call it:
>
>
>lcLastName='KELLY'
>text to lcCmd noshow
> select lastname, firstname, mi from coPatients where isactive=1
> where lastname=?lcLastName
>endtext
>
>if sqlexec(gnConnHandle,lcCmd,"CurPatLookUp")<1
> =sqlerror()
>else
> ...code here
>endif
>
>
>is there a performance difference if I make all my queries StoredProcedures vice just calling them in this fashion?
>
>Thanks
>Kirk