Hello Joseph!

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of joseph fuchaka


platform Delphi 7 on windows 2000, sp4., database sybase asa 9.
   
  i have a payroll processing program that does some lengthy processing
on employees, using stored procedures, the design is that on button
click, select a query of all employees and then pass varibles of an
employee to different procedures that do different computations on
values in a database. the problem is that if a try to enhance a
procedure e.g. add another function so that they are more than 23
procedures i get an error, some variables are not found. but when they
are just 23 procedures all variables are found and the program loops
through all records, e.g. 200 employees. is there a way of doing this
lengthy processing, and not busting the memory, or the resource governor
in the database. any help will be appreciated, 
  Joseph Fuchaka. Nairobi.
>>>>>>>>>>>>>>>>>>>>>>
Chances are your code is becoming unmanageable because the variables are
setup in different spots within different procedures.  I would recommend
creating an global object to hold all your variables and then create a
procedure to load all the variables before you start calling all your
subroutines.  By centralizing your data and then having all your
procedures reference this one location, you should avoid losing your
data.

Other than that, be careful to not duplicate work just because you have
created a procedure to do something.  For example, if you are
calculating federal taxes, and state taxes, you may see that you are
doing similar tasks but referencing different tables (Fed tables, State
Tables).  You may find it easier to break down the work into functions
that do things and then call them inside your main subroutines that
handle distinct tasks.

Good Luck!

Tom Nesler
Live long!...   Code Well!...   and Prosper!...   V

Reply via email to