Ver Mensaje Individual
  #4  
Antiguo 27-11-2012
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
Cita:
Empezado por Walterio Ver Mensaje
[...] te tengo catalogado como el "Master of TClientDataSet".
Antes de que se haga un rumor de eso, he de decir que hay muchas cosas de TClientDataSet que todavía no he utilizado, como el almacenamiento en XML, los campos de sumario (aggregate fields) o la propiedad CommandText, con la cual podrías resolver el problema que planteas.

Cita:
Empezado por Ayuda de Delphi 7 (la más completa y accesible)
Specifies an SQL command to be executed by the database server.

property CommandText: string;

CommandText specifies what data the client dataset wants to receive from its (internal or external) provider. It is either
  • An SQL statement (query) for the database server to execute.
  • The name of a table or stored procedure.

If the client dataset uses an internal provider, CommandText is required.

If the client dataset uses an external provider component, CommandText represents a replacement for the property that the source dataset uses to identify its data (the SQL of a query, or the name of a table or stored procedure). If the provider’s Options property does not include poAllowCommandText (which, by default, it does not), then CommandText has no effect.

When CommandText is a non-empty string, its value is sent to the provider when the client dataset opens or when you call the Execute method. The specified SQL command, table, or stored procedure overrides the current value of the provider’s associated dataset.

If the SQL statement takes parameters, be sure that they are in the correct order, as the provider performs parameter binding on CommandText statements by index only.
Saludos.
Responder Con Cita