使用链接到链接到共享点的访问的 SQL Server 更新表
我正在运行 Access 2010 和 Sharepoint 2007。
我创建了一个 Access 数据库。我已将 SQL Server 中的 5 个表链接到该数据库。我还链接了一个 Sharepoint 列表到该数据库。
我想做的是更新 Sharepoint 列表上的 5 个字段。这些字段中的每一个都来自我的 SQL Server 中的不同表。
我还在我的数据库中编写了一个简单的查询,将 SQL Server 中的这 5 列放在一起,完全按照我希望的方式将它们上传到我的 Sharepoint 列表中的 5 列中。
是否可以根据我的查询或表中的字段更新此 Sharepoint 列表?这样做的最佳方法是什么?
我无法消除 Access 数据库的使用并直接从 SQL 转到 Sharepoint,因为我需要根据 Access 中的 Sharepoint 列表运行报告。
I am running Access 2010 and Sharepoint 2007.
I have created an Access database. To this database I have linked 5 tables from an SQL Server. To this database I have also linked a Sharepoint list.
What I would like to do is update 5 fields on the Sharepoint list. Each of these fields would come from a different one of my tables from my SQL Server.
I have also written a simple query in my database that puts these 5 columns from the SQL Server together exactly how I want them uploaded into the 5 columns in my Sharepoint list.
Is it possible to update this Sharepoint list based on my query or fields in my tables? What is the best way to go about doing this?
I can not eliminate the use of the Access database and go directly from SQL to Sharepoint as I am required to run reports based on my Sharepoint list out of Access.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
此问题的解决方案与在不使用 SQL Server 和 SharePoint 的情况下使用本地访问表的情况相同。
您可以创建更新查询,并根据 id 更新这些字段。只是不太清楚您计划如何更新给定的列。但是,假设有两个表,例如 tblSQLserver 和 tblSharePoint,您可以执行以下操作:
因此,上面的代码将基于具有相同 ID 的所有公司名称从 SQL Server 表更新到 SharePoint 表。因此标准 Access 更新查询可以通过这种方式运行。
但是,如果我要运行多个更新,则不太清楚要在哪个 ID 列上连接这些表,我会考虑使用 reocrdset 和 VBA 代码。请注意,这些类型的更新在 SharePoint 上运行速度非常慢。
The solution to this problem is the same as if you where using local access tables without SQL Server and without SharePoint.
You can create a update query, and update those fields based on the id. It just not quite clear how you plan to update the given columns. However, assume two tables such as tblSQLserver and tblSharePoint, you can go:
So, the above would update all Company names from the SQL Server table to the SharePoint table based on them having the same ID. So standard Access update queries can be run this way.
However, if I was going to run several updates, it is not quite clear what ID column you going to join these tables on, I would consider using a reocrdset and VBA code. Note that these types of updates run VERY slow on SharePoint.