Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Conexión con bases de datos (https://www.clubdelphi.com/foros/forumdisplay.php?f=2)
-   -   ADO- Como puedo saber cuanto registros borre o actualice (https://www.clubdelphi.com/foros/showthread.php?t=21264)

mgaray 11-05-2005 19:31:42

ADO- Como puedo saber cuanto registros borre o actualice
 
Hola a Todos:
Quiero saber, de ser posible, como obtener el numero de registros que se actualizaron o borraron. Estoy utilizando tecnologia ADO y el Objeto ADOCommand.

Desde ya Gracias.

roman 11-05-2005 19:42:47

De la ayuda de Delphi:

Código:

Execute method (TADOCommand)

Delphi syntax:

function Execute: _Recordset; overload;
function Execute(const Parameters: OleVariant): _Recordset; overload;
function Execute(var RecordsAffected: Integer; const Parameters: OleVariant): _RecordSet; overload;

[...]

Description

Call Execute to immediately execute the command specified in the CommandText property.

RecordsAffected indicates the number of records, if the command operates on data, that are affected by the command after execution.

Parameters is a collection of parameters for the command, unnecessary if the command does not use any parameters.

¿Esto no te funciona?

// Saludos

mgaray 11-05-2005 20:43:20

No encuentro la propiedad RecordsAfected
 
Estuve buscando la manera de encontrarla declarando una variable de tipo recordset y no la encuentro.
Despues puse :
var
numreg:_Recordset
begin
numreg:=ADOCommand.Execute;
end;
pero aun cuando afecto filas me regresa el valor nil.

roman 11-05-2005 20:56:38

function Execute(var RecordsAffected: Integer; const Parameters: OleVariant): _RecordSet; overload;

// Saludos

mgaray 11-05-2005 21:28:47

Gracias por la ayuda
 
Gracias por tu ayuda todo se pudo resolver


La franja horaria es GMT +2. Ahora son las 00:28:10.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi