On Wed, Oct 8, 2008 at 3:58 PM, MB Software Solutions, LLC
<[EMAIL PROTECTED]> wrote:
> Stephen Russell wrote:
>> On Tue, Oct 7, 2008 at 6:31 PM, Ricardo Araoz <[EMAIL PROTECTED]> wrote:
>>> I don't like stored procedures.
>>>
>>> Why? Because you can not do 'everything' pertaining the data base with
>>> them. So you will end up with some of the code you use for your data in
>>> stored procedures and some of the code in your business layer. And I do
>>> not like that, I'd rather have everything in the same place.
>>> What do you think about this?
>> -------------------------------------------------------
>>
>> Your kidding right?
>>
>> An SP is a specific code segment to achieve a goal.  I have seen some
>> that were in excess of 40,000 lines of code and took about 3 to 4 days
>> to run.  OK it remapped all activity at a hospital since data existed
>> and took in events that were being added from outside med facilities.
>> It was cool as shit tough.
>>
>> This case had 1 sp to call 20+ SPs.
>>
>>
>>
>
> The thing I like about SPs is for guaranteeing something happens via the
> database triggers.  Other than that, I'd use SPs for running processes
> on the server that are too resource intensive to be run on the
> client....like TR said in his answer.  No sense pulling all kinds of
> data to the client when you can get it all done on the server.
------------------------------------

Triggers are triggers, not Stored Procedures.

SPs are just an easily found code base.  Past that they are another
object of many on the server.

Some people do ALL processing with them.  CRUD via SPs.

Others use SPs to accomplish Business Functions, such as EOM, EOQ, EOY
processing just to name a few examples.

I use views to do my advanced READs in CRUD operations.  I am now
using Linq to SQL so it all gets wierd.  An insert operation in C#
that passes in a loaded data object logT:


using (ProductionSystemEntities PS = new ProductionSystemEntities())
            {

                LogicorTransaction lt = new LogicorTransaction();

                lt.id = Guid.NewGuid();
                lt.IP = logT.IP;
                lt.recipientPackage = logT.RecipientPackage ;
                lt.LPN = logT.LPN;
                lt.carrierCode = logT.CarrierCode;
                lt.serviceCode = logT.ServiceCode;
                lt.trackingNumber = logT.TrackingNumber;
                lt.weight  = logT.Weight;
                lt.shipperFee = logT.ShipperFee;
                lt.fuelSurcharge = logT.FuelSurcharge;
                lt.packageShippedDT = DateTime.UtcNow;
                lt.duties = logT.Duties;
                lt.fees = logT.Fees;
                lt.domestic = logT.Domestic;
                lt.errorText  = logT.ErrorText ;
                if (logT.ErrorText != null)
                {
                    if (logT.ErrorText.Length > 0)
                    {
                        lt.logicorErrorFlag = true;
                    }
                }
                lt.labelDT = null;
                lt.logicorKey = logT.LogicorKey;
                lt.shippedFromLocation = logT.ShippedFromLocation;
                lt.specialFee = logT.SpecialFee;
                lt.shippedFromLocation = logT.ShippedFromLocation;


                try
                {
                    PS.AddToLogicorTransaction(lt);
                    PS.SaveChanges();
                }
                catch (Exception ex)
                {
                    WriteToEvnetLog("Mimeo Shipping System",
"Application", ex.Message );
                    return false;
                }
                return true;

I don't ask for data connection, that is part of the
ProductionSystemEntities object.




-- 
Stephen Russell
Sr. Production Systems Programmer
Mimeo.com
Memphis TN

901.246-0159


_______________________________________________
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