[Lazarus] Accessing MS SQLServer database from Lazarus/FPC?
Frank Church
vfclists at gmail.com
Fri Jan 21 13:42:28 CET 2011
On 20 January 2011 20:05, Graeme Geldenhuys <graemeg.lists at gmail.com> wrote:
> On 20 January 2011 20:28, Bo Berglund <bo.berglund at gmail.com> wrote:
> >>
> >>Use query.ExecSQL instead of query.Open even in Delphi!
> >
> > Not if the stored procedure returns a recordset....
>
> And with this whole mess I would end by saying: And that is why you
> will not see me ever use a Stored Procedure! 99.99% of the time they
> contain business logic, which doesn't belong in the data layer of your
> application in any case - you can't unit test that business logic.
>
> Just my 2ยข worth...
>
>
>
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.
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.
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.
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?
You might even see the odd password there. Scary.
> --
> Regards,
> - Graeme -
>
>
> _______________________________________________
> fpGUI - a cross-platform Free Pascal GUI toolkit
> http://fpgui.sourceforge.net
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
--
Frank Church
=======================
http://devblog.brahmancreations.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110121/e84b44ef/attachment-0003.html>
More information about the Lazarus
mailing list