谢谢高手了??

解决方案 »

  1.   

    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, DB, ADODB, StdCtrls;type
      TForm1 = class(TForm)
        Button1: TButton;
        ADOStoredProc1: TADOStoredProc;
        ADOTable1: TADOTable;
        procedure Button1Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
    var
    fADOStoredProc:tADOStoredProc;
    begin
    try
      fADOStoredProc:=tADOStoredProc.Create(self);
      fADOStoredProc.ConnectionString   :=ADOTable1.ConnectionString ;
     fADOStoredProc.ProcedureName := 'dt_verstamp006' ;
       fADOStoredProc.Open ;
         finally
         fADOStoredProc.Free ;
        end;
       
      end;end.
      

  2.   

    动态创建并释放都是
    try
      ....
    finally
      *.free