Board index » delphi » Inserted & Deleted Keywords

Inserted & Deleted Keywords

Is there a way to access the INSERTED & DELETED Temporary databases in MSSQL
7.0 without using a Select statment in a trigger ? I could use New.Field or
Old.Field with Interbase.

Selim

 

Re:Inserted & Deleted Keywords


Selim,

The INSERTED and DELETED tables are not temporary tables. They are not
permanent tables. They are virtual tables that only have an existence within
a trigger.

Quote
Selim Anter <se...@mail.turk.net> wrote in message

news:86hvf1$ms410@bornews.borland.com...
Quote
> Is there a way to access the INSERTED & DELETED Temporary databases in
MSSQL
> 7.0 without using a Select statment in a trigger ? I could use New.Field
or
> Old.Field with Interbase.

> Selim

Re:Inserted & Deleted Keywords


I don't see how. You could obviously select them into
variables and work that way, but it would require a select... ie.

select @insert_field = fieldname from inserted

Craig Baugh

Quote
Selim Anter <se...@mail.turk.net> wrote in message news:86hvf1$ms410@bornews.borland.com...
> Is there a way to access the INSERTED & DELETED Temporary databases in MSSQL
> 7.0 without using a Select statment in a trigger ? I could use New.Field or
> Old.Field with Interbase.

> Selim

Re:Inserted & Deleted Keywords


Hi Selim ,

    you must use  UpdateRecordTypes property of TBDEDataset but you can use
it only
   if you are using cachedupdates

    This property specifies the type of records visible in a dataset when
cached updates are enabled.

    Values of UpdateRecordTypes  : [rtModified, rtInserted, rtDeleted,
rtUnmodified];

     if you set the UpdateRecordTypes property of Tdataset to [rtInserted]
your dataset will show only newly ynserted records or if yo set it to
[rtDeleted, rtInserted] your dataset will show deleted and Inserted
records..

Example :
Query1.UpdateRecordTypes:= [rtInserted];
Query1.UpdateRecordTypes:= [rtDeleted, rtInserted];
Look at delphi help for  detailed explanation...

Have a nice day!

Quote
Selim Anter wrote in message <86hvf1$ms...@bornews.borland.com>...
>Is there a way to access the INSERTED & DELETED Temporary databases in
MSSQL
>7.0 without using a Select statment in a trigger ? I could use New.Field or
>Old.Field with Interbase.

>Selim

Other Threads