从 SQL Server 2005 访问直通查询
我已经从 SQL Server 数据库创建了直通查询,以将数据显示到 Access 数据库中。我现在想要的是让这些信息更新另一个表。其中包含从另一个直通查询导入的其他信息。
I have created a passthrough query from an sql server database to display data into an access database. What i am wanting now is for this information to then update another table. which has other information on it other information on it imported from another passthrough query.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将您的直通视为只读查询。您将无法进行任何记录操作 - 只能返回数据。
您需要一个单独的查询来执行更新。您甚至可能需要将直通生成的数据集写入临时表,并在更新查询中使用它。
在传递的简化解释中,假设我有两个链接表,每个表包含 10000 条记录,我将它们链接起来以进行返回 5 条记录的查询。 Access 需要通过网络提取 20000 条记录(全部来自每个表),以便对它们进行比较并给出 5 个结果。在直通中,它在另一端进行比较,并且只带来 5 条记录。
Think of your passthroughs as read only queries. You will not be able to do any record manipulation - only return data.
You would want a separate query that does your updates. You may even have to write the resulting dataset from the passthrough to a temp table and use that in your update query.
In a simplified explanation of passthroughs, imagine I have two linked tables with 10000 records each and I link them for a query that returns 5 records. Access needs to pull 20000 records (all from each table) across the network in order to compare them and give you 5 results. In a passthrough, it does the comparison on the other end and only brings 5 records across.