⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bdmantenimiento.pas.svn-base

📁 example delphi with database
💻 SVN-BASE
字号:
unit BDMantenimiento;

interface
uses TDataConexion,ADODB,DB,SysUtils,Variants;
type
      TBaseDato = class
      private
        Query : TADOQuery;
        StoredProc: TADOStoredProc;
      public
      constructor Create;
      destructor Destroy;override;
      function EliminacionTotal():Boolean;
      end;
implementation

constructor TBaseDato.Create();
begin
   inherited Create;
   Query:=TADOQuery.Create(nil);
   Query.Connection:=Database.Conexion;
   StoredProc:=TADOStoredProc.Create(nil) ;
   StoredProc.Connection:=Database.Conexion;
end;

destructor TBaseDato.Destroy();
begin
       StoredProc.Connection:=Nil;
       StoredProc.Free;
       inherited Destroy;
end;
function TBaseDato.EliminacionTotal():Boolean;
var resultado:integer;
begin
      StoredProc.ProcedureName:='eliminacion_total';
      StoredProc.Parameters.CreateParameter('@retorno',ftInteger,pdInputOutput,0,0);
      StoredProc.Prepared:=True;
      StoredProc.ExecProc;
      resultado:=StoredProc.Parameters.ParamValues['@retorno'];
      StoredProc.Parameters.Clear;
      if resultado <> 0 then
          EliminacionTotal:=False
      else
          EliminacionTotal:=True;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -