如何使用无dsn连接在访问中创建传递查询?

时间:2022-09-27 11:59:05

I'm using DSN-less connections to my SQL Server in an Access database. However, whenever I try to write a "Pass-Through" query and run it, a dialog box pops up asking for the DSN.

我正在访问数据库中使用到SQL服务器的无dsn连接。但是,每当我尝试编写一个“传递”查询并运行它时,就会弹出一个对话框,请求DSN。

1 个解决方案

#1


17  

In SQL view, choose properties after you have selected passthrough query and insert an ODBC connect string. For example:

在SQL视图中,在选择了passthrough查询并插入一个ODBC连接字符串之后,选择属性。例如:

ODBC;DRIVER=SQL Server;SERVER=Server\Instance;Trusted_Connection=Yes;DATABASE=Test

See also: http://www.connectionstrings.com/sql-server-2008

参见:http://www.connectionstrings.com/sql -服务器- 2008

#1


17  

In SQL view, choose properties after you have selected passthrough query and insert an ODBC connect string. For example:

在SQL视图中,在选择了passthrough查询并插入一个ODBC连接字符串之后,选择属性。例如:

ODBC;DRIVER=SQL Server;SERVER=Server\Instance;Trusted_Connection=Yes;DATABASE=Test

See also: http://www.connectionstrings.com/sql-server-2008

参见:http://www.connectionstrings.com/sql -服务器- 2008