New Posts New Posts RSS Feed: Calculations on server
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Calculations on server

 Post Reply Post Reply
Author
DenisK View Drop Down
IdeaBlade
IdeaBlade


Joined: 25-Aug-2010
Posts: 715
Post Options Post Options   Quote DenisK Quote  Post ReplyReply Direct Link To This Post Topic: Calculations on server
    Posted: 01-Dec-2011 at 12:48pm
Hi Mark;

Our suggestion is to use a hybrid of the 2. 

A server method, and calling stored proc within the server method to do db intensive processes if necessary.
Back to Top
smi-mark View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 24-Feb-2009
Location: Dallas, Texas
Posts: 343
Post Options Post Options   Quote smi-mark Quote  Post ReplyReply Direct Link To This Post Posted: 30-Nov-2011 at 8:48pm
In our app we have to do a few balance calculations, involving dates, so we don't want to bring back all this data to the client and calculate it there.

On one of our search screens we would like to show the current balance for the customer, and filter by customers with a balance. When you are dealing with many results, bringing back all the data needed to calculate a balance is ridiculous.

One option is a stored procedure, but then we lose the flexibility of having dynamic filters and ordering on queries (Well this is still possible but more work)

Another option is a server method, and have the server bring back all the data, calculate it, and then return a projection to the client.

What do you recommend? The stored proc would obviously be the fastest way, but you lose flexibility.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down