Ver Mensaje Individual
  #2  
Antiguo 26-10-2010
Avatar de Al González
[Al González] Al González is offline
In .pas since 1991
 
Registrado: may 2003
Posts: 5.604
Reputación: 29
Al González Es un diamante en brutoAl González Es un diamante en brutoAl González Es un diamante en brutoAl González Es un diamante en bruto
Hola.

Nunca hice eso con ADO, pero leyendo la ayuda de Delphi respecto al método TADOCommand.Execute, creo que tendrías que cambiar una de las sentencias:

Código Delphi [-]
  consu.Recordset := Execute;

Cita:
When a command is executed that creates a recordset, Execute returns the recordset and it must be accessed through an ADO dataset component. To do this, assign the return value of Execute directly to the recordset property of an ADO data set component. For example:

ADODataSet1.Recordset := ADOCommand1.Execute;
No olvides destruir los objetos TADOCommand y TADOQuery cuando ya no los necesites.

Saludos.

Al González.
Responder Con Cita