<br><br><div class="gmail_quote">On 20 January 2011 20:05, Graeme Geldenhuys <span dir="ltr"><<a href="mailto:graemeg.lists@gmail.com">graemeg.lists@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On 20 January 2011 20:28, Bo Berglund <<a href="mailto:bo.berglund@gmail.com">bo.berglund@gmail.com</a>> wrote:<br>
>><br>
>>Use query.ExecSQL instead of query.Open even in Delphi!<br>
><br>
> Not if the stored procedure returns a recordset....<br>
<br>
</div>And with this whole mess I would end by saying: And that is why you<br>
will not see me ever use a Stored Procedure! 99.99% of the time they<br>
contain business logic, which doesn't belong in the data layer of your<br>
application in any case - you can't unit test that business logic.<br>
<br>
Just my 2¢ worth...<br>
<font color="#888888"><br>
<br></font></blockquote><div><br>Apologies to Vincent, I just couldn't resist, I need to say that Stored Procedures in some cases are absolutely necessary, even for business logic.<br><br>Sometimes you need to do a whole lot of processing, and if you have to drag all the data down a slow WAN link for processing, the app will fail miserably.<br>
<br>When you need to poll the database every second for some events, it is much easier to do the processing server side and return the results.<br><br>There is also the need to keep critical logic server side for security reasons. Have you ever viewed your apps strings at runtime to see how much of the programs SQL logic is exposed?<br>
<br>You might even see the odd password there. Scary.<br><br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><font color="#888888">
--<br>
Regards,<br>
- Graeme -<br>
<br>
<br>
_______________________________________________<br>
fpGUI - a cross-platform Free Pascal GUI toolkit<br>
<a href="http://fpgui.sourceforge.net" target="_blank">http://fpgui.sourceforge.net</a><br>
</font><div><div></div><div class="h5"><br>
--<br>
_______________________________________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lists.lazarus.freepascal.org">Lazarus@lists.lazarus.freepascal.org</a><br>
<a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus" target="_blank">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Frank Church<br><br>=======================<br><a href="http://devblog.brahmancreations.com">http://devblog.brahmancreations.com</a><br>