GRID FORWARD

Hallo.

Help if you can

if   have a table  with the following fields :
     date1    date,
     debit     number,
     credit    number.
and.
On the  table  i put  a calc field  named  Balance.

i want  using Dbgrid  to do the  next

date1           debit     gredit    balance
  1/1/1999     1000                     1000
  2/1/1999                  5000       -4000
12/2/1999     7000                     3000
and  show  on.

is there i way to calculate the balance column .
  (I now i way . Using one more query with the balance until date. or
    Writing records on a other table).
But
 do you now another way using some   r_sum function ???
 or else.

****************************************************************
QUESTION 2
I AM USING  ORACLE 7
HOW CAN I   LOCK A TABLE FROM DELPHI. ?????