Subject Re: [firebird-support] Copy a record
Author Nando Dessena
Michael,

M> I have written a SQL like:

M> Update MyTabel set (
M> MyF1 = :PMyF1,
M> MyF2 = :PMyF3,
M> MyF3 = :PMyF4
M> etc
M> where
M> MachineID = :PMachineID

M> But everytime I add Or delete a field I have to remember to edit this
M> sql. Which I often forget !

if memory does not serve you well <g> you can build the SQL statement
at run time based on the metadata information you can grab from
RDB$RELATIONS, RDB$RELATION_FIELDS and RDB$RELATION_CONSTRAINTS.

If you are using high-leve libraries like those available with Delphi,
there are simpler methods to query metadata.

Ciao
--
Nando mailto:nandod@...