Code to Monitor for An Unanticipated Event (table deletion)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32633

    #16
    Indeed. I wouldn't be surprised if the solution you proposed in post #13 were preferred by the OP, and the text you quoted is largely what I base that on. The question as asked though, is a larger issue and should be covered directly regardless of the OP's specific requirements. Mainly because others will see the question and hope to find an answer that matches their own requirements. Having answers that cover all aspects is good for the thread.

    Comment

    • zmbd
      Recognized Expert Moderator Expert
      • Mar 2012
      • 5501

      #17
      NeoPa,
      Pretty much hit-the-nail-on-the-head.
      However, I would not allow cascade delete... just update.

      As for doing both a bound field on the hidden form, the enforced relationship, and ADezii... because I don't know the exact mechanisim that is dropping the table I'm hoping to trap the event... one of the three alone might not catch... this approach is like using a shotgun to duck hunt instead of a rifle. (no, I don't hunt... but I'd use a shotgun for duck if I did :) )

      Still waiting on OP to post Ora table names... just my gut feeling that OP has the same issue I had with same named table.

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32633

        #18
        Originally posted by Zmbd
        Zmbd:
        However, I would not allow cascade delete... just update.
        In that case you *may* find nothing is captured. I'm sure if you found that were the case in practice though, you'd soon move to something that did.

        Comment

        • TheSmileyCoder
          Recognized Expert Moderator Top Contributor
          • Dec 2009
          • 2322

          #19
          This has nothing to do with capturing the event, but merely to do with stopping it from happening. I must admit this is a shot in the dark.
          Have you turned off "Name autocorrect" in your application?

          Comment

          • NeoPa
            Recognized Expert Moderator MVP
            • Oct 2006
            • 32633

            #20
            Originally posted by Tim Marshall
            Tim Marshall:
            Any suggestions on how to capture when tbl_Local_Prefs might be dropped would be greatly appreciated.
            I'm not sure why you would say that Smiley. I believe the OP wants to know where and why it's happening as well as stopping it on an individual occasion. Just as I would if I were in their position. Without an understanding of why something occurs it's hard to plan for it not rearing its ugly head in future projects.

            Comment

            • TheSmileyCoder
              Recognized Expert Moderator Top Contributor
              • Dec 2009
              • 2322

              #21
              @Neo:
              I think you may have misunderstood me (or I you). My first line of post #19, was merely referring to my own post, in that my own post #19 contained no info on how to capture the event, merely a shot-in-the-dark as to the cause.

              I absolutely agree that I would want to know WHY/How its occurring. But having programmed for a few years now, I also realize there comes a point once in a while where I just have to stop looking at the why, and focus on a workaround. I hate it when something reaches that point, but I don't have unlimited time to study the quirks that sometimes popup.

              Comment

              • NeoPa
                Recognized Expert Moderator MVP
                • Oct 2006
                • 32633

                #22
                Sounds like I misunderstood you then, TBF. What you say makes perfect sense :-)

                Comment

                • TheSmileyCoder
                  Recognized Expert Moderator Top Contributor
                  • Dec 2009
                  • 2322

                  #23
                  NeoPa
                  What you say makes perfect sense :-)
                  Marked in calender for future reference :)

                  Comment

                  • NeoPa
                    Recognized Expert Moderator MVP
                    • Oct 2006
                    • 32633

                    #24
                    I never said that!!

                    (Darn it - Too late :-()

                    Comment

                    • mshmyob
                      Recognized Expert Contributor
                      • Jan 2008
                      • 903

                      #25
                      I guess I will throw my 2 cents into this conversation. Since you are using an ODBC source then you can use built in functions of Jet to trace what it sends to your ODBC source.

                      This assumes that the drop table statement is SQL related and is coming from your mde to your oracle data source.

                      Turn the Jet database engine SQl trace to on.

                      Your registry setting should be changed from the default off to on by changing the TraceSQLMode flag.

                      You can get the full details here for Access registry settings
                      These registry settings work up-to Access 2007 and maybe for 2010 but I do not have 2010 to try.

                      Get help with your questions about Microsoft Access with our how-to articles, training videos, and support content.


                      cheers,

                      Comment

                      • NeoPa
                        Recognized Expert Moderator MVP
                        • Oct 2006
                        • 32633

                        #26
                        It seems you fell over the same issue I did Mshmyob :-D See post #3 for clarification, but the table deletion is local Jet I'm afraid.

                        That said, your post is interesting anyway, and the link is well worth looking through for anyone with an interest in that sort of stuff.

                        Comment

                        • mshmyob
                          Recognized Expert Contributor
                          • Jan 2008
                          • 903

                          #27
                          Aaah .... I see. My bad for not reading far enough.

                          cheers,

                          Comment

                          Working...