【问题标题】:need help in macros and access DB with external oracle DB connectivity?需要宏方面的帮助并通过外部 oracle 数据库连接访问数据库?
【发布时间】:2011-04-12 04:00:42
【问题描述】:

在现有的 Microsoft Access 数据库中,我们有从 oracle DB 映射的输入值的表,我希望在宏的帮助下,它可以从 Oracle DB 清除到 access DB 中。在这里我的问题是无论如何要确定oracle DB Field到Access DB Field之间的现有映射?请帮忙。

【问题讨论】:

  • 这些链接表是从 Oracle 访问还是通过查询?
  • 哈里森有什么方法可以识别链接吗?

标签: oracle ms-access macros


【解决方案1】:

使用 VBA:

Dim fld As DAO.Field
Dim tdf As TableDef
Dim db As Database

    Set db = CurrentDb

    For Each tdf In db.TableDefs
        ''Linked table
        If Len(tdf.Connect) > 0 Then
            Debug.Print tdf.Connect
            ''Local name
            Debug.Print tdf.Name
            ''Source name
            Debug.Print tdf.SourceTableName

            For Each fld In tdf.Fields
               ''Local name
                Debug.Print fld.Name
               ''Source name
                Debug.Print fld.SourceField
            Next
        End If
    Next

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-07
    • 2010-10-06
    • 2011-07-17
    • 2011-07-23
    相关资源
    最近更新 更多