Karen,
I have never done this (I think) and am not sure if it is possible,
however can a person abort the delete function from within a before
delete trigger?
If you can, you could ask for a password and continue the delete. If
the password is not given or is incorrect, abort the delete procedure.
(I am not where I can test this idea at present), but perhaps upon not
getting a correct password, then you could either clear your Where
variable "spClaim" ?
Or perhaps a break, etc. Again, I have not tested this, but if
possible, I see it being a handy option! This would also remove the
need to remove the trigger every month.
-Bob
On 3/13/2022 12:12 PM, 'Karen Tellef' via RBASE-L wrote:
Doug: That's how I started out. Altho I never abbreviate and always
use "DELETE ROWS" I figured I couldn't use that for a search in case I
for some reason abbreviated or did "DELETE FROM".
So I searched for "FROM claim" because I would never split that into
separate lines of code (darn those line continuations, right?). Of
course that turned up a whole bunch of other syntax (select,
correlated updates, insert) but not a single "delete" other than that
one monthend routine, where she deletes the trigger first and then
puts it back on.
I didn't think of searching reports, so I just did that and nothing
came up.
I have no external programs other than the one startup routine. I had
one table holding "common code", and I had searched that for "FROM
claim" also.
This weekend I had an AH HA moment, but just for a second... Years
ago this was a 6.5 DOS app that I converted. I wondered if there was
any chance that someone still has the DOS icon on their desktop (I
thought I had removed them all, but maybe not). All the DOS programs
are moved to a different directory, and the startup APX file has a
"connect XXX" in there without pointing to a directory so there's no
way that would work as there is no database in the DOS program
directory. But for the heck of it, I told my contact there to check
everyone's computer on Monday to see if the icon is still there and to
ask each person if they've ever run DOS. These people rate a 0.01 on
technical skills, so they couldn't figure out a way around it. But I
want her to check anyway.
Karen
-----Original Message-----
From: Doug Hamilton <[email protected]>
To: [email protected]
Sent: Sun, Mar 13, 2022 10:51 am
Subject: Re: [RBASE-L] - Delete Trigger mystery?
What about using FIND in Custom EEPS, Expressions and Control
Properties in all forms for:
DEL ROWS FROM [tablename]
DELETE ROWS FROM [tablename]
DEL FROM [tablename]
DELETE FROM [tablename]
If you R:Style or use consistent coding you might skip some of the
above commands.
And possibly RMD files, maybe even reports?
Doug
On 3/13/2022 9:03 AM, 'Karen Tellef' via RBASE-L wrote:
Adrian: That's what I'm thinking some kind of "system" user without a
name. Nope, database is not accessed by any other program (client is
very small, simple, very non-tech). This is the only trigger in the
database. Deletions are contiguous. Looking at the time of deletion,
they all follow each other a second apart, every single one. So a
batch is being deleted at once. Then we won't see anything for
months. This has happened 3 times that we know of during the past year
Karen
-----Original Message-----
From: Adrian Huessy <[email protected]> <mailto:[email protected]>
To: [email protected] <mailto:[email protected]>
<[email protected]> <mailto:[email protected]>
Sent: Sat, Mar 12, 2022 2:52 pm
Subject: RE: [RBASE-L] - Delete Trigger mystery?
Karen,
Brainstorming without knowing your application and database: Missing
user and computer name could indicate system user. Access via
ODBC/Oterro, other trigger? The way of deletion may give a hint: are
the deletions contiguous or scattered during the day?
Adrian
*Von:*'Karen Tellef' via RBASE-L [mailto:[email protected]
<mailto:[email protected]>]
*Gesendet:* Samstag, 12. März 2022 20:45
*An:* [email protected] <mailto:[email protected]>
*Betreff:* Re: [RBASE-L] - Delete Trigger mystery?
Adrian: I am assuming they were actually deleted. Since the trigger
is "before delete" and operates as it should other than giving me that
null DeletedBy, and I can't find them anywhere in the original table,
I have to think they were deleted. If there was an issue with indexes
or a database problem itself, I would think it would show up on an
Autochk. This database has never had a bad Autochk.
Karen
-----Original Message-----
From: Adrian Huessy <[email protected]> <mailto:[email protected]>
To: [email protected] <mailto:[email protected]>
<[email protected]> <mailto:[email protected]>
Sent: Sat, Mar 12, 2022 11:14 am
Subject: RE: [RBASE-L] - Delete Trigger mystery?
Karen,
Quick question: do you feel that records are/were effectively deleted
or do you have NULL entries even though nothing was deleted?
BR, Adrian
*Von:*'Karen Tellef' via RBASE-L [mailto:[email protected]
<mailto:[email protected]>]
*Gesendet:* Samstag, 12. März 2022 01:02
*An:* [email protected] <mailto:[email protected]>
*Betreff:* [RBASE-L] - Delete Trigger mystery?
Why I needed the before-delete trigger: _no one_ should ever be
deleting data from this table. And although they have the full
version of RBase, no one knows how to "get to the R> prompt". There is
a monthend routine that the senior user runs that will delete a batch
of data, but that's all (we remove the trigger before this monthend
routine, then put it back on)
Yet every now and then we find data mysteriously disappeared.
So I created a before-delete trigger. It takes the record to be
deleted and appends it to an archive table. 3 columns in the archive
table will hold the deleted date / time and the user who deleted it.
Works perfectly at my development environment and when I test it at
the place where the database is installed. Records the date, time and
the user.
However, twice now we have found records in that archive table that
had been deleted (hundreds at a time). The records had the deleted
date/time but had *NO *user name.
Here's the code I use in my stored procedure. The DeletedDate and
DeletedTime works fine, it gets updated every time. There is no login
to this app, so I grab the NetUser (used many times in the application
for other things, successfully). The first time that the archive had
no user name, I modified the stored procedure to grab the
ComputerName. But still, nothing.....
SET VAR vText TEXT = NULL
SET VAR vText = (CVAL("NetUser"))
IF vText IS NULL THEN
SET VAR vText = (CVAL("ComputerName"))
ENDIF
UPDATE ClaimsDeleted SET DeletedDate = .#DATE, DeletedTime = .#TIME, +
DeletedBy = .vText WHERE claim = .spClaim
Can anyone think of anything else I can trap that would help me figure
out how/when the records got deleted?
Or does anyone know how records could get deleted when there _actually
is no_ NetUser or ComputerName?
Karen
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
<http://www.rbase.com/support/usersgroup_guidelines.php>
---
You received this message because you are subscribed to the Google
Groups "RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/1654695576.980450.1647043308102%40mail.yahoo.com
<https://groups.google.com/d/msgid/rbase-l/1654695576.980450.1647043308102%40mail.yahoo.com?utm_medium=email&utm_source=footer>.
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
<http://www.rbase.com/support/usersgroup_guidelines.php>
---
You received this message because you are subscribed to the Google
Groups "RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/dbba74c3572c4f6aa054b424fd42d70b%40huessy.com
<https://groups.google.com/d/msgid/rbase-l/dbba74c3572c4f6aa054b424fd42d70b%40huessy.com?utm_medium=email&utm_source=footer>.
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
<http://www.rbase.com/support/usersgroup_guidelines.php>
---
You received this message because you are subscribed to the Google
Groups "RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/840423822.1120239.1647114324158%40mail.yahoo.com
<https://groups.google.com/d/msgid/rbase-l/840423822.1120239.1647114324158%40mail.yahoo.com?utm_medium=email&utm_source=footer>.
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
<http://www.rbase.com/support/usersgroup_guidelines.php>
---
You received this message because you are subscribed to the Google
Groups "RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/5b376909a00d4120a6e7feb7845f6517%40huessy.com
<https://groups.google.com/d/msgid/rbase-l/5b376909a00d4120a6e7feb7845f6517%40huessy.com?utm_medium=email&utm_source=footer>.
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
<http://www.rbase.com/support/usersgroup_guidelines.php>
---
You received this message because you are subscribed to the Google
Groups "RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/509935127.1196680.1647180236390%40mail.yahoo.com
<https://groups.google.com/d/msgid/rbase-l/509935127.1196680.1647180236390%40mail.yahoo.com?utm_medium=email&utm_source=footer>.
------------------------------------------------------------------------
Avast logo <https://www.avast.com/antivirus>
This email has been checked for viruses by Avast antivirus software.
www.avast.com <https://www.avast.com/antivirus>
<https://mail.aol.com/webmail-std/en-us/suite#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google
Groups "RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/6c085c61-396b-4d8e-9195-4ff9703b339d%40wi.rr.com
<https://groups.google.com/d/msgid/rbase-l/6c085c61-396b-4d8e-9195-4ff9703b339d%40wi.rr.com?utm_medium=email&utm_source=footer>.
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google
Groups "RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/1139292042.1235109.1647191548253%40mail.yahoo.com
<https://groups.google.com/d/msgid/rbase-l/1139292042.1235109.1647191548253%40mail.yahoo.com?utm_medium=email&utm_source=footer>.
--
Robert Thompson
TTC. Inc.
219-363-7441
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google Groups "RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/8bdb7d91-a5e9-c311-a129-862595506938%40comcast.net.