Ted Roche wrote:
> On 8/9/07, Steve Ellenoff <[EMAIL PROTECTED]> wrote:
>   
>> Can someone please explain why someone would use SQLPREPARE() over
>> SQLEXEC()?
>>     
>
> Did you try RTFHGtVF?
>
> ("Read The Fine Hacker's Guide (tm) to Visual Foxpro (r)")
>
> You use SQLPrepare when you have a statement that you're going to run
> over and over again, say like a very complex SQL statement, or one for
> "SELECT * from Customer LIMIT ?tstart, ?trange" where only the
> parameters are going to change (you can make a fine browse on a couple
> million records with this on one SQL connection and the fetch on
> another connection, but you shouldn't, generally).
>
>
>   
I believe it was to take advantage of caching with the above reason...so 
the RDBMS didn't have to reload the execution plan or strategy every 
time.  However, as perhaps Mike Yearwood or someone else pointed out, 
dynamic ("on the fly") SQL is just as good/quick as anything prepared 
and/or stored procedures due to the nature of how today's RDBMSes operate.

-- 
Michael J. Babcock, MCP
MB Software Solutions, LLC
http://mbsoftwaresolutions.com
http://fabmate.com
"Work smarter, not harder, with MBSS custom software solutions!"



_______________________________________________
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
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** 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