1. 작성한 스토어드 프로시저
CREATE PROC sp_JajaeProcess
              @JajaeState   varchar(10),
 @JajaeAction varchar(10),
              @NewQty int,  
              @OldQty int, @ProductID  int
AS
IF @JajaeState = 'N'
BEGIN
  IF @JajaeAction = '입력'
         BEGIN
         Update CY_Product  SET Qty = Qty + @NewQty      Where ProductID = @ProductID
         END
  IF @JajaeAction = '출력'
         BEGIN
         Update CY_Product  SET Qty = Qty - @NewQty    Where ProductID = @ProductID
         END
END
IF @JajaeState = 'M'
BEGIN
  IF @JajaeAction = '입력'
         BEGIN
         Update CY_Product  SET Qty = Qty + @NewQty - @OldQty     Where ProductID = @ProductID
         END
  IF @JajaeAction = '출력'
         BEGIN
         Update CY_Product  SET Qty = Qty - @NewQty + @OldQty     Where ProductID = @ProductID
         END
END
IF @JajaeState = 'D'
BEGIN
  IF @JajaeAction = '입력'
         BEGIN
         Update CY_Product  SET Qty = Qty + @NewQty     Where ProductID = @ProductID
         END
  IF @JajaeAction = '출력'
         BEGIN
         Update CY_Product  SET Qty = Qty - @NewQty      Where ProductID = @ProductID
         END
END
2. 쿼리애널라이저에서는 
  exec sp_JajaeProcess 'N' ,'출력',10,0,1           -> 정상으로 수불에서 -10 됨.
3. 델파이코딩에서
      with stpJajaeProcess do
       begin
       Parameters.ParamByName('@JajaeState').Value   := JajaeAction;
       Parameters.ParamByName('@JajaeAction').Value  :=  qryJajaeMaster.FieldByName('State').asString;
       Parameters.ParamByName('@NewQty').Value       := NewQty;
       Parameters.ParamByName('@OldQty').Value       := OldQty;
       Parameters.ParamByName('@ProductID').Value    := strtoint(FrmJajaeDetail.JajaeProductID); 
       ExecProc;
       end;
아 !! 실행은 되는데.. 값이 안바뀜~~ 도무지 이해를 못하겠습니다. 살려주세요 
그래서...
   Parameters.CreateParameter('@JajaeState',  ftString,  pdInput, 10, JajaeAction);
        Parameters.CreateParameter('@JajaeAction', ftString,  pdInput, 10, qryJajaeMaster.FieldByName('State').asString);
        Parameters.CreateParameter('@NewQty',      ftInteger, pdInput, 1,  NewQty);
        Parameters.CreateParameter('@OldQty',      ftInteger, pdInput, 1,  OldQty);
        Parameters.CreateParameter('@ProductID',   ftInteger, pdInput, 1,  strtoint(FrmJajaeDetail.JajaeProductID));
이렇게 직접 CreateParameter 해보았는데도 안됩니다. 
어찌 해야 합니까? 아~ ~~ ADO라서 Profiler로 돌리려해도 DB권한이 없어서 못 돌리고. 애혀
			 
	
	
    
    
	
	
    
    
    
Parameters.CreateParameter('@JajaeAction', ftString, pdInput, 10, qryJajaeMaster.FieldByName('State').asString);
Parameters.CreateParameter('@NewQty', ftInteger, pdInput, 1, NewQty); <-- 자릿수 틀린거 아닌가요?
Parameters.CreateParameter('@OldQty', ftInteger, pdInput, 1, OldQty);
Parameters.CreateParameter('@ProductID', ftInteger, pdInput, 1, strtoint(FrmJajaeDetail.JajaeProductID));
parameters.clear;
를 먼저 해보세요...
try
:
:
execproc;
except
on e:exception do
begin
showmessage(e.message);
end;
end;
혹시 에러 없는지 확인해 보세요.~