MS Access 中编辑富含 ODBC 表数据的数据的最佳方法
这是问题的简化版本:我们在 Oracle 数据库上有一个表。我们无法扩展此表(购买了应用程序)。我们需要用一些文本来描述该 Oracle 表的每一行。
因此我们决定使用 MS Access 来实现此目的。所以我在 Access 中创建了一个表(称之为 ACCESS_TABLE)。该表由 ID 和 MEMOTEXT(以及更多)组成。 ID 是 Oracle 上表的链接(称为 ORACLE_TABLE)。我已成功通过 ODBC 将 MS Access 连接到 Oracle,并且两个表都可用。
我的第一个想法是加入他们。但随后我无法进行编辑。由于与 ODBC 表的 JOIN,MS Access 锁定了所有字段。
然后我想到创建一个表单来编辑 ACCESS_TABLE 并显示 ORACLE_TABLE 中的数据。这可能有效,但我放弃了这个想法,因为我想向用户显示 ORACLE_TABLE (作为主表),以便用户知道哪些行仍然需要描述。
所以我想知道是否复制 ORACLE_TABLE 中的所有数据并将其添加到 ACCESS_TABLE 中。然后,我必须实现一些复制算法,在 ACCESS_TABLE 中的行发生更改时删除/更新行,但这可能有效。我想知道如何才能最好地做到这一点。
我还想知道我是否走在正确的轨道上,或者总体上应该以不同的方式解决这个问题。
This is the simplified version of the problem: We have a table on an Oracle Database. We cannot extend this table (bought app). We need to describe each row of that Oracle table with some text.
So the descission has been to use MS Access for this. So I created in Access a table (Call it ACCESS_TABLE). The table consists of ID and MEMOTEXT (and more). The ID is the link to the table on Oracle (Call it ORACLE_TABLE). I have successfully linked up MS Access thru ODBC to Oracle and have both tables available.
My first idea was to JOIN them. But then I cannot do edit. MS Access locks all fields up because of the JOIN with an ODBC table.
Then I thought of creating a form to just edit the ACCESS_TABLE and display the data from the ORACLE_TABLE. This might work but I abandoned that idea also because I want to show the user the ORACLE_TABLE (as the leading table) so that the user knows what rows still need a description.
So I was wondering whether I copy all data from the ORACLE_TABLE and add it to the ACCESS_TABLE. I then have to implement some replication algorithm of deleting/updating rows in the ACCESS_TABLE when they change but this might work. And I wondered how this could be done best.
Also I wondered whether I am at all on the right track or should tackle the problem differently in general.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为什么你这么快就放弃了表格?您是否尝试过将 Oracle 作为主窗体,将 Access 作为子窗体?还可以同步两个子表单,以便子表单 1 显示连接到 Access 的所有 Oracle 记录(如果需要显示 Access 记录是否存在),而子表单 2 显示子表单 1 中所选记录的 Access 记录。 Northwind 示例数据库中的示例(客户订单表单,AFAIR)。
Why did you abandon the form so quickly? Did you try Oracle as the main form and Access as a subform? It is also possible to have two subforms synchronized, so that subform 1 shows all Oracle records, joined to Access, if required to show whether an Access record exists, and subform 2 shows the Access record for the selected record in subform 1. There is an example in the Northwind sample database (customer ordser form, AFAIR).