Ver Mensaje Individual
  #7  
Antiguo 16-03-2004
Avatar de jachguate
jachguate jachguate is offline
Miembro
 
Registrado: may 2003
Ubicación: Guatemala
Posts: 6.254
Reputación: 28
jachguate Va por buen camino
hola Jorge. No hace falta que los datos de tu Query provengan de diferentes tablas para poder usar los TupdateSQL... pero son el único mecanismo disponible en todos los motores (a excepción de oracle) para lograr modificar consultas de este tipo, que son Read-Only por "circunstancia"... valiendose de la jerga del BDE.

Creo que en tu caso simplemente podes quitar el objeto TUpdateSQL, y poner la propiedad del query RequestLive a True. Si de cualquier forma queres aprender mas sobre esta técnica... por aqui te dejo una pequeña introducción...

Cita:
Empezado por Delphi 4 Help
Use a TUpdateSQL object to provide SQL statements used to update read-only datasets represented by TQuery components when cached updates are enabled. A dataset is read-only either by design or circumstance. If a dataset is read-only by design, the application itself does not provide a user interface for updating data, but may institute a programmatic scheme behind the scenes. If a dataset is read-only by circumstance, it indicates that the Borland Database Engine (BDE) returned a read-only result set. This usually happens for queries made against multiple tables. Such queries are, by SQL-92 definitions, read-only.

TUpdateSQL provides a mechanism for circumventing what some developers consider an SQL-92 limitation. It enables a developer to provide INSERT, UPDATE, and DELETE statements for performing separate update queries on otherwise read-only result sets in such a manner that the separate update queries are transparent to the end user.

In practical application, a TUpdateSQL object is placed on a data module or form, and linked to a TQuery component through that component’s UpdateObject property. If the UpdateObject property points to a valid TUpdateSQL object, the SQL statements belonging to the update object are automatically applied when cached updates are applied.
Hasta luego.

__________________
Juan Antonio Castillo Hernández (jachguate)
Guía de Estilo | Etiqueta CODE | Búsca antes de preguntar | blog de jachguate
Responder Con Cita