On Wed, 18 Oct 2006, Terry A Haimann wrote:

> My real question is how do you execute in the sql in these fields?  Is
> there some sort of hook, like maybe from the dbnavigator?

They are used automatically when you execute the dataset's Delete and 
Post methods ?

So something like

  MyDS.Append;
  // Fill Fields...
  MyDS.Post;  // InsertSQL is executed.

  MyDS.Edit;
  // Edit Fields...
  MyDS.Post;  // UpdateSQL is executed.

  MyDS.Delete; // DeleteSQL is executed/

Michael.

> 
> On Wed, 2006-10-18 at 21:31 +0200, Michael Van Canneyt wrote:
> > 
> > On Wed, 18 Oct 2006, Terry A Haimann wrote:
> > 
> > > I noticed that now on the mysql connection component there is a
> > > DeleteSQL, UpdateSQL and InsertSQL varibles of TStrings. How do I use
> > > them? I am running Lazarus 0.0.18 beta on a FC4 machine.  
> > 
> > Just enter something like
> >  
> >   Update MyTable
> >   Set
> >     MyField = :MyField,
> >     MyOtherField = :MyOtherField
> >   where
> >     MyKeyField = :OLD_MyKeyField;
> > 
> > or
> > 
> >   Delete from MyTable Where MyKeyField=:MyKeyField;
> > 
> > and so on.
> > 
> > The parameters (identifiers starting with : ) will be replaced with the 
> > new field values, the parameter name must match the field name. 
> > Any parameters starting with OLD_ will be replaced with the old 
> > field value.
> > 
> > Michael.
> > 
> > _________________________________________________________________
> >      To unsubscribe: mail [EMAIL PROTECTED] with
> >                 "unsubscribe" as the Subject
> >    archives at http://www.lazarus.freepascal.org/mailarchives
> -- 
> Terry A Haimann <[EMAIL PROTECTED]>
> 
> _________________________________________________________________
>      To unsubscribe: mail [EMAIL PROTECTED] with
>                 "unsubscribe" as the Subject
>    archives at http://www.lazarus.freepascal.org/mailarchives
> 

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to