Ver Mensaje Individual
  #9  
Antiguo 10-02-2013
Avatar de duilioisola
[duilioisola] duilioisola is offline
Miembro Premium
 
Registrado: ago 2007
Ubicación: Barcelona, España
Posts: 1.735
Reputación: 20
duilioisola Es un diamante en brutoduilioisola Es un diamante en brutoduilioisola Es un diamante en bruto
El problema parece estar en que sqlSecuencias es un Query y por lo tanto tiene unsolo SQL asignado.
En este caso el SQL es un 'SELECT ... FROM TABLA'. TZQuery al ser un SELECT solo devuelve valores, pero no sabe como hacer updates, inserts ni deletes. Es un componente que sirve para ejecutar una instrucción en la base de datos.
Supongo que deberías utilizar el componente TZUpdateSQL. Este componente tiene un SQL para cada acción que necesita.

Mira esta web

Cita:
TZUpdateSQL

A TZUpdateSQL object provides statements to modify the data of a result set that is retrieved by a TZQuery object. The TZUpdateSQL component is comparable to BDE's TUpdateSQL component. Here is an example how to define the statements of an SQL statement with corresponding update statements (based on a dialect 3 database):

SQL.Sql:

SELECT * FROM names

UpdateSQL.InsertSql:

INSERT INTO names (recno, name)
VALUES (:recno, :name)

UpdateSQL.ModifySql:

UPDATE names
SET recno = :RecNo,
name = :name
WHERE recno = ld_recno

UpdateSQL.DeleteSql:

DELETE FROM names
WHERE recno = ld_recno



The "OLD_" parameter prefix for SQL statements

The "old_" prefix is handled according to the handling with BDE components. By using "OLD_" as prefix for a fieldname you are able to access the value of the field before it was changed. This is very helpful if you have to compare fieldvalues in a WHERE clause.


Queries with read only resultsets

In geneal a TZUpdateSQL object is assigned to a TZQuery object that has a read only resultset. This makes it possible to change its data. Such read only queries are queries that join multiple tables. But also with "normal" "RequestLive" resultsets you may use TZUpdateSQL (see: TZQuery).
Responder Con Cita