dbTalk Databases Forums  

D3 Triggers and cancelling file process

comp.databases.pick comp.databases.pick


Discuss D3 Triggers and cancelling file process in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
dtsig
 
Posts: n/a

Default D3 Triggers and cancelling file process - 01-10-2007 , 04:41 PM






I can't find this anywhere in the docs so ..

Let's say you want to put a trigger on a file to make sure that only
certain users can write to (delete read certain values etc). the
trigger finds that non-authorized user tries to write to the file.

How do you cancel the write process? I imagine a good ABORT would do
it but that would cause other problems.

If this is in the doc then please point me in the right direction

Thanks

DTsig


Reply With Quote
  #2  
Old   
Ross Ferris
 
Posts: n/a

Default Re: D3 Triggers and cancelling file process - 01-10-2007 , 05:14 PM






The "magic" is "INPUTERR" (pretty obvious - NOT!!)

On of the( very few) things that D3/NT DOES do well is to provide more
hooks for triggers (eg: CALLR - read time, CALLO - file open etc) ....
been waiting for these to appear on the *nix platform for ages (IIRCF
UV at least has this better "granularity")


dtsig wrote:
Quote:
I can't find this anywhere in the docs so ..

Let's say you want to put a trigger on a file to make sure that only
certain users can write to (delete read certain values etc). the
trigger finds that non-authorized user tries to write to the file.

How do you cancel the write process? I imagine a good ABORT would do
it but that would cause other problems.

If this is in the doc then please point me in the right direction

Thanks

DTsig


Reply With Quote
  #3  
Old   
dtsig
 
Posts: n/a

Default Re: D3 Triggers and cancelling file process - 01-11-2007 , 09:34 AM



oh my <sigh> .. i just tried it and it works

After re-reading the *documentation* it see where it says that it stops
the process ..

why .. WHY would someone do that? oh well .. that's PICK

thanks man ..

dtsig

Ross Ferris wrote:
Quote:
The "magic" is "INPUTERR" (pretty obvious - NOT!!)

On of the( very few) things that D3/NT DOES do well is to provide more
hooks for triggers (eg: CALLR - read time, CALLO - file open etc) ....
been waiting for these to appear on the *nix platform for ages (IIRCF
UV at least has this better "granularity")


dtsig wrote:
I can't find this anywhere in the docs so ..

Let's say you want to put a trigger on a file to make sure that only
certain users can write to (delete read certain values etc). the
trigger finds that non-authorized user tries to write to the file.

How do you cancel the write process? I imagine a good ABORT would do
it but that would cause other problems.

If this is in the doc then please point me in the right direction

Thanks

DTsig


Reply With Quote
  #4  
Old   
dtsig
 
Posts: n/a

Default Re: D3 Triggers and cancelling file process - 01-11-2007 , 09:42 AM



I put a trigger on a file to simply watch changes. I used inputerr to
capture rows that id on't want changed.

For the write it works correctly .. the odd thing is that if i delete
the record (no delete trigger)
it fires and works like an update and so it doesn't change (delete) BUT
it also puts out a message

[261] One or more updates failed.

i'll try to find a method to capture this before the user sees it but
if you have any info please pass on.

thanks


Ross Ferris wrote:
Quote:
The "magic" is "INPUTERR" (pretty obvious - NOT!!)

On of the( very few) things that D3/NT DOES do well is to provide more
hooks for triggers (eg: CALLR - read time, CALLO - file open etc) ....
been waiting for these to appear on the *nix platform for ages (IIRCF
UV at least has this better "granularity")


dtsig wrote:
I can't find this anywhere in the docs so ..

Let's say you want to put a trigger on a file to make sure that only
certain users can write to (delete read certain values etc). the
trigger finds that non-authorized user tries to write to the file.

How do you cancel the write process? I imagine a good ABORT would do
it but that would cause other problems.

If this is in the doc then please point me in the right direction

Thanks

DTsig


Reply With Quote
  #5  
Old   
Ross Ferris
 
Posts: n/a

Default Re: D3 Triggers and cancelling file process - 01-11-2007 , 03:55 PM



Why?

'cause that is the closest they have to a THROW ERROR command .... and
I don't think anyone will be adding new commands/facilities within D3
Basic any time soon (though I would LOVE to be proven wrong - though I
can not think of anything I'd use off the top of my head)

dtsig wrote:
Quote:
oh my <sigh> .. i just tried it and it works

After re-reading the *documentation* it see where it says that it stops
the process ..

why .. WHY would someone do that? oh well .. that's PICK

thanks man ..

dtsig

Ross Ferris wrote:
The "magic" is "INPUTERR" (pretty obvious - NOT!!)

On of the( very few) things that D3/NT DOES do well is to provide more
hooks for triggers (eg: CALLR - read time, CALLO - file open etc) ....
been waiting for these to appear on the *nix platform for ages (IIRCF
UV at least has this better "granularity")


dtsig wrote:
I can't find this anywhere in the docs so ..

Let's say you want to put a trigger on a file to make sure that only
certain users can write to (delete read certain values etc). the
trigger finds that non-authorized user tries to write to the file.

How do you cancel the write process? I imagine a good ABORT would do
it but that would cause other problems.

If this is in the doc then please point me in the right direction

Thanks

DTsig


Reply With Quote
  #6  
Old   
Bill H
 
Posts: n/a

Default Re: D3 Triggers and cancelling file process - 01-12-2007 , 12:43 AM



Dave:

There's a delete bit set that ACCESS() can query.

Bill

"dtsig" <dtsig (AT) hotmail (DOT) com> wrote

Quote:
I put a trigger on a file to simply watch changes. I used inputerr to
capture rows that id on't want changed.

For the write it works correctly .. the odd thing is that if i delete
the record (no delete trigger)
it fires and works like an update and so it doesn't change (delete) BUT
it also puts out a message

[261] One or more updates failed.

i'll try to find a method to capture this before the user sees it but
if you have any info please pass on.

thanks


Ross Ferris wrote:
The "magic" is "INPUTERR" (pretty obvious - NOT!!)

On of the( very few) things that D3/NT DOES do well is to provide more
hooks for triggers (eg: CALLR - read time, CALLO - file open etc) ....
been waiting for these to appear on the *nix platform for ages (IIRCF
UV at least has this better "granularity")


dtsig wrote:
I can't find this anywhere in the docs so ..

Let's say you want to put a trigger on a file to make sure that only
certain users can write to (delete read certain values etc). the
trigger finds that non-authorized user tries to write to the file.

How do you cancel the write process? I imagine a good ABORT would do
it but that would cause other problems.

If this is in the doc then please point me in the right direction

Thanks

DTsig




Reply With Quote
  #7  
Old   
dtsig
 
Posts: n/a

Default Re: D3 Triggers and cancelling file process - 01-12-2007 , 08:33 AM



I saw that but i dont see how i can keep the 'delete' message from
happening.

dtsig

Bill H wrote:
Quote:
Dave:

There's a delete bit set that ACCESS() can query.

Bill

"dtsig" <dtsig (AT) hotmail (DOT) com> wrote in message
news:1168530174.351250.203210 (AT) 77g2000hsv (DOT) googlegroups.com...
I put a trigger on a file to simply watch changes. I used inputerr to
capture rows that id on't want changed.

For the write it works correctly .. the odd thing is that if i delete
the record (no delete trigger)
it fires and works like an update and so it doesn't change (delete) BUT
it also puts out a message

[261] One or more updates failed.

i'll try to find a method to capture this before the user sees it but
if you have any info please pass on.

thanks


Ross Ferris wrote:
The "magic" is "INPUTERR" (pretty obvious - NOT!!)

On of the( very few) things that D3/NT DOES do well is to provide more
hooks for triggers (eg: CALLR - read time, CALLO - file open etc) ....
been waiting for these to appear on the *nix platform for ages (IIRCF
UV at least has this better "granularity")


dtsig wrote:
I can't find this anywhere in the docs so ..

Let's say you want to put a trigger on a file to make sure that only
certain users can write to (delete read certain values etc). the
trigger finds that non-authorized user tries to write to the file.

How do you cancel the write process? I imagine a good ABORT would do
it but that would cause other problems.

If this is in the doc then please point me in the right direction

Thanks

DTsig



Reply With Quote
  #8  
Old   
Mark Brown
 
Posts: n/a

Default Re: D3 Triggers and cancelling file process - 01-12-2007 , 03:06 PM



I'm not convinced that seeing the error message is a "bad thing".

I know we're all about user-friendly and no one likes to see error messages
or any kind. But I personally believe the user would be better served
knowing that the update/delete failed, asking why and finding out they are
not allowed to do that, rather than thinking the update worked and going on
about their business ignorant of the facts.

If keeping people from writing/updating/deleting is important, why not look
at the old but well-tested method of update and retrieval locks.

Mark Brown


"dtsig" <dtsig (AT) hotmail (DOT) com> wrote

Quote:
I saw that but i dont see how i can keep the 'delete' message from
happening.

dtsig

Bill H wrote:
Dave:

There's a delete bit set that ACCESS() can query.

Bill

"dtsig" <dtsig (AT) hotmail (DOT) com> wrote in message
news:1168530174.351250.203210 (AT) 77g2000hsv (DOT) googlegroups.com...
I put a trigger on a file to simply watch changes. I used inputerr to
capture rows that id on't want changed.

For the write it works correctly .. the odd thing is that if i delete
the record (no delete trigger)
it fires and works like an update and so it doesn't change (delete) BUT
it also puts out a message

[261] One or more updates failed.

i'll try to find a method to capture this before the user sees it but
if you have any info please pass on.

thanks


Ross Ferris wrote:
The "magic" is "INPUTERR" (pretty obvious - NOT!!)

On of the( very few) things that D3/NT DOES do well is to provide more
hooks for triggers (eg: CALLR - read time, CALLO - file open etc) ....
been waiting for these to appear on the *nix platform for ages (IIRCF
UV at least has this better "granularity")


dtsig wrote:
I can't find this anywhere in the docs so ..

Let's say you want to put a trigger on a file to make sure that only
certain users can write to (delete read certain values etc). the
trigger finds that non-authorized user tries to write to the file.

How do you cancel the write process? I imagine a good ABORT would
do
it but that would cause other problems.

If this is in the doc then please point me in the right direction

Thanks

DTsig





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.