【问题标题】:Access Database Linked to Sharepoint Tables访问链接到 Sharepoint 表的数据库
【发布时间】:2015-10-20 12:10:22
【问题描述】:

我一直在为一个工作组开发一个相当复杂的访问数据库。该数据库完全在 Access 2010 中设计,运行良好。然后,我将所有表推送到 SharePoint 2013 并将它们链接回数据库。我现在在使用更新查询运行一段代码时遇到错误。它表示由于锁冲突,它无法更新更新查询中的所有记录。我已检查并在 SharePoint 中关闭了版本控制。该数据库的构建使用户可以在表中搜索与他们需要输入的内容匹配的记录,并将旧记录“复制”到他们正在创建的新记录中。使用这种设计,表单和子表单都是从同一个表中提取的,我认为这可能是问题所在,但在将表推送到 SharePoint 之前,它在 Access 中运行良好。有人对我如何解决这个问题有任何想法吗?谢谢!

这是我认为导致问题的代码。这个特定的错误没有给我调试的选项,所以我不确定。 私有子命令165_Click()

Dim SQL As String

Me.Dirty = False

SQL = "UPDATE [Cross_Border_Grid_Table]" _
          & "SET [Export Country]='" & Me.[Export Country] & "', [Export State]='" & Me.[Export State] & "', [Export City and/or Providence]='" & Me.[Export City and/or Providence] & "', [Import Country]='" & Me.[Import Country] & "', [Import State]='" & Me.[Import State] & "', [Import City and/or Providence]='" & Me.[Import City and/or Providence] & "', " _
          & "[Shipment Type]='" & Me.[Shipment Type] & "', [Material Category]='" & Me.[Material Category] & "', [Sub Category]='" & Me.[Sub Category] & "', [Specific Material]='" & Me.[Specific Material] & "', [Transgenic/ Conventional]='" & Me.[Transgenic/ Conventional] & "', [Intended Use]='" & Me.[Intended Use] & "', " _
          & "[Specific Use]='" & Me.[Specific Use] & "', [Material Common Name]='" & Me.[Material Common Name] & "', [Scientific Name]='" & Me.[Scientific Name] & "', [Event]='" & Me.[Event] & "', [Material Condition]='" & Me.[Material Condition] & "', [Permit Required]='" & Me.[Permit Required] & "', " _
          & "[Phytosanitary Certificate Required]='" & Me.[Phytosanitary Certificate Required] & "', [Agency Labels]='" & Me.[Agency Labels] & "',  [Other Requirements]='" & Me.[Other Requirements] & "', [Data Modified]='" &  Me.[Data Modified] & "', [RegCode]='" & Me.[RegCode] & "' WHERE [ID] = " &  [Forms]![New_Shipment_Home_frm]![Text105]

DoCmd.RunSQL SQL

【问题讨论】:

    标签: database sharepoint


    【解决方案1】:

    如果其他人有类似的问题,我能够重写代码来创建记录集,并且使用记录集能够将记录集属性设置为 .LockEdits = False

    我希望这可以在某个时候对其他人有所帮助,因为似乎有很多人遇到了问题并且没有解决方案!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-03-17
      相关资源
      最近更新 更多