监控意外事件的代码(表删除) [英] Code to Monitor for An Unanticipated Event (table deletion)

查看:83
本文介绍了监控意外事件的代码(表删除)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我是否有某种方法可以在后台运行一些代码(可能带有隐藏的形式或其他方式),可以在意外删除表事件时监视和捕获可能会发生?在这种情况下,正在发生的事情是应用程序中的本地Jet表被神秘地删除。


我在运行A2003,A2007和A2010的各种PC上部署了A2003 mde。该应用程序仅在本地PC上运行,并通过服务器数据库(Oracle通过ODBC)上的传递查询来处理数据。但是,有一些当地的喷气表。其中之一tbl_Local_Prefs是一条记录,其中包含两个用于用户名称的字段,实际上从未更新过。它有一条带有用户名的记录。在64位Win 7 pro机器的某些A2007上,它不时被删除。


应用程序每周运行多次,这个神秘的删除在同一台机器上每周发生一次,有时甚至更多。这两台机器只运行A2007。


应用程序中没有代码可以删除表,也没有任何表定义代码。我确实在启动时运行的代码试图摆脱那些可怕的日志消息表(在我的情况下,我的用户名是Admin,所以它是Admin-001,002等)。它如下:

展开 | 选择 | Wrap | 行号

解决方案

我的代码中没有看到任何内容可能具有删除任何名为[tbl_Local_Prefs]的表的效果。


另一方面,没有办法从Access中捕获我已知的表(我''我很确定这意味着没有)。这并不是说你不久之后就不能确定它已经发生了,但是如果你正在寻找一个可以与之互动甚至可能取消的可发生事件,那么我很害怕你们运气不好。


另一方面,不是第一个,而是另一个新手 - 想想三手,Oracle,作为一个成熟的BE服务器系统,当然应该有触发器或它们的等价物,可以在服务器上设置以捕获这些奇怪的事件并与之交互。我的经验是SQL Server,我很害怕,但如果你有兴趣从这个角度进一步深入研究这个问题,那么我可以建议在我们的Oracle论坛中发布这个问题的传真,看看会出现什么。

Neopa,非常感谢你的回复。我确实将通过Oracle搜索


但是,我不确定Oracle是否可以提供帮助。我不是Oracle专家(除了编写SQL),但我在各种触发器中使用Pl / SQL(SQL Server中的t-SQL,对吗?)确实有相当的经验,但我不确定他们将如何通过ODBC连接来影响本地喷气表。


是否有可能某种网络交互可以对本地Access表做些什么?我从1998年开始一直在使用Access,并且习惯于直到00年代中期在cdma usenet组上闲逛,但我的印象是不可能的。

-

Tim


请检查BE的设计,看看是否有一个具有该名称的表。我遇到了一种情况,我正在使用MSA从Ora中提取报告...我的FE中的一个表与BE中的临时表具有相同的名称,不知何故,当Ora放弃表时,它正在丢弃前端同名的表。没有人知道为什么或如何使用MSA2003 mde - 只是在黑暗中刺伤并且很容易检查。


Hello folks,

Is there some way I can run some code in the background (possibly with a hidden form or otherwise) that can monitor and capture when an unanticipated drop table event might take place? In this case, what is happening is a local Jet table in an application is mysteriously being deleted.

I have an A2003 mde deployed on various PCs running A2003, A2007, and A2010. The application is only run on local PCs and manipulates data via pass-through queries on a server database (Oracle via ODBC). However, there are some local jet tables. One of these, tbl_Local_Prefs, is a single record with two fields for the user''s name and is practically never updated. It has a single record with the name of the user. On some A2007 on 64 bit Win 7 pro machines, it is somehow being deleted from time to time.

The application is run multiple times every week day and this mysterious deletion occurs as much as once per week, sometimes more often than that, on the same two machines. Both machines run only A2007.

There is no code in the application to drop the table, and no table definition code whatsoever. I do have code run on start up that tries to get rid of those awful log message tables (in my case, my user name is Admin, so it''s Admin - 001, 002, etc). It is as follows:

Expand|Select|Wrap|Line Numbers

解决方案

I see nothing in your code that could possibly have the effect of deleting any table named [tbl_Local_Prefs].

On the other hand, there is no way of capturing a table deletion from within Access that I know of (I''m pretty sure that means there is none). That is not to say that you could not determine pretty shortly afterwards that it had taken place, but if you''re looking for a caturable event that you can interact with and even possibly cancel, then I''m afraid you''re out of luck.

On the other hand, not the first one but a new other hand - think three handed here, Oracle, as a proper grown-up BE Server system, should certainly have Triggers or their equivalent, that can be set up on the server to capture and interact with these strange occurrences. My experience is with SQL Server I''m afraid, but if you''re interested in delving into this further from that angle then may I suggest posting a facsimile of this question in our Oracle forum and seeing what comes up.


Neopa, thank you very much for your reply. I will indeed trawl through the Oracle

However, I''m not sure if Oracle could help. I''m not an Oracle expert (except in writing SQL), but I do have a fair bit of experience using Pl/SQL (t-SQL in SQL Server, right?) in various triggers, but I''m not sure how they would reach through the ODBC connection to affect local jet tables.

Is it possible some sort of network interaction could do something to a local Access table like that? I''ve been playing with Access since 1998 and used to hang out on the c.d.m.a usenet group up until the mid 00s, but I''m under the impression that could not happen.
--
Tim


Please check the design of the BE to see if there is a table with that name. I ran into a situation with an instrument that I was using MSA to pull reports from the Ora... one table in my FE had the same name as a temp table in the BE and somehow when Ora would drop the table it was droping the same named table in the front end. No-one knows why or how but it was with a MSA2003 mde - just a stab in the dark and an easy check.


这篇关于监控意外事件的代码(表删除)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆