Ver Mensaje Individual
  #2  
Antiguo 22-09-2010
subzero subzero is offline
No confirmado
 
Registrado: ene 2004
Ubicación: Móntería - Córdoba - Colombia
Posts: 289
Reputación: 0
subzero Va por buen camino
Hola nuevamente.

He resuelto el inconveniente a través del siguiente código pero me queda aun la duda de lo anterior:

Código Delphi [-]
function Tmiclase.ejecuta_sp(ADOSP : TADOStoredProc;
SP : String; datos : Array of String; Exec : boolean = true; campo_devolver : string = ''): string;
var line, Y : string;  x : byte;
begin
  with ADOSP do
  begin
    Close;
    ProcedureName := SP;
    Parameters.Refresh;
    for x := 1 to Parameters.Count-1 do
     if (Parameters.Items[x].Direction = pdInput) then
     begin
       if(datos[x-1] = 'null')then
        Parameters.Items[x].Value := Null
       else
        Parameters.Items[x].Value := datos[x-1];
     end
     else
      Parameters.Items[x].Value := '0';
    if Exec then ExecProc else Active := true;
    if campo_devolver <> '' then
     result := Parameters.ParamByName(campo_devolver).Value;
  end;
end;

Saludos.
Responder Con Cita