在链接到 SQL Server 数据库的 Access 中使用 SQL Server 特定代码 [英] Using SQL Server specific code in Access linked to SQL Server database

查看:49
本文介绍了在链接到 SQL Server 数据库的 Access 中使用 SQL Server 特定代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个链接(通过 ODBC 连接)到 SQL Server 2008 数据库的访问文件.我正在尝试针对此数据库编写一些报告.但是,当我使用访问中不存在的特定于 SQL Server 的 SQL 语法编写报告的选择查询时,Access 会阻塞.这不应该工作,因为它是 SQL Server 引擎运行查询并将数据发送回 Access 以显示?有什么办法可以让它发挥作用吗?

I have an access file that is linked (through an ODBC connection) to a SQL Server 2008 database. I am trying to write some reports against this database. However, Access chokes when I write the select query of the report with SQL syntax specific to SQL Server that doesn't exist in access. Shouldn't this work, since it's the SQL Server engine running the queries and just sending the data back to Access to display? Is there any way to get this to work?

需要它来处理 Access 2007 和 2010 以及 SQL Server 2005 和 2008 的任意组合.

Need this to work on any combination of Access 2007 and 2010, and SQL Server 2005 and 2008.

编辑
注意:我无法创建 SQL Server 存储过程或函数,也无法以任何方式修改原始 (SQL Server) 架构.

Edit
Note: I cannot create a SQL Server stored procedure or function, or otherwise modify the original (SQL Server) schema in any way.

推荐答案

找到答案:我需要使用传递查询".

Found the answer: I need to use a "pass-through query".

这篇关于在链接到 SQL Server 数据库的 Access 中使用 SQL Server 特定代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆