Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to handle many similar SPROCS
Message
From
10/01/2008 08:57:40
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
 
 
To
09/01/2008 23:12:39
General information
Forum:
ASP.NET
Category:
Databases
Environment versions
Environment:
VB 8.0
Database:
MS SQL Server
Miscellaneous
Thread ID:
01280182
Message ID:
01280844
Views:
22
I think I am trying to make my issue more complicated than it is. Here is my root question that is causing all of these other questions:

I have one single dataset I am trying to return. I am returning Orders, and each order has a dealer ID. The SPROC returns data only from the order table. Now I want to show the DealerName with each Order (I need to join my Dealer table). Do I do the join in my SPROC and update all my existing GetOrder SPROCS, and the structure of my class or Strongly Typed DataSet (there really needs to be an acronym created for that)?

I know what I CAN do, I just don't know what I SHOULD do.

>Re-writing all those existing Stored Procs sounds like it would be a very time-consuming process. If you would be doing it only to reduce the number of Procs, I'd say why bother? Or does it really become problematic to remember which Procs need updating when a field gets added? Even so, I'm with Kevin on this, the idea of automating the process somehow.
>
>~~Bonnie
>
>
>
>
>>What is project K2?
>>
>>The problem is that we are oftentimes adding field to the database, and instead of having to update every SPROC I would only like to update certain SPROCs.
>>
>>When I create something start to finish, I usually use the approach you mention and I try to keep things as lean as possible so I don't have this same problem. The problem is that I am maintaining a huge POS (not point of sale) system that was built by people who had no business building it.
>>
>>>Hey, Mike,
>>>
>>>What I've done, and what I believe others have done frome time to time, is generate their stored procs.
>>>
>>>So if you have many stored procs that follow the same pattern...
>>>
>>>GetAllCostCenters
>>>GetCostCenterByPK
>>>GetCostCenterBy
>>>GetActiveCostCenters
>>>
>>>GetAllCustomers
>>>GetCutomersByPK
>>>GetCutomersBy
>>>GetActiveCustomers
>>>
>>>etc., etc.
>>>
>>>You can generate them from either a script, or even from a .NET app.
>>>
>>>As far as having fewer stored procs with many parms....you know what...I really thing it's the old "six, and one half dozen the other"
>>>
>>>My two cents...
Very fitting: http://xkcd.com/386/
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform