我可以在 Visual Studio 中一起使用不同的数据连接吗?
是否可以在 Visual Studio 中使用两个或多个数据连接并在单个查询中使用它们,就像我们在 SQL Server Management Studio 中所做的那样(同时使用 MySQL 和 MSSQL)?
例如
SELECT * INTO testMySQL.dbo.shoutbox
FROM openquery(MYSQL, 'SELECT * FROM tigerdb.shoutbox')
Is it possible to use two or more data connections in Visual Studio and use them in a single query, like we can do in SQL server management Studio (while we use MySQL and MSSQL at the same time)?
E.g.
SELECT * INTO testMySQL.dbo.shoutbox
FROM openquery(MYSQL, 'SELECT * FROM tigerdb.shoutbox')
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您使用 Microsoft SQL Server 和 MySQL,那么您可以使用 Microsoft SQL Server 链接服务器来完成此操作。链接服务器是通过 OLEDB 链接的服务器。该链接服务器将允许您从 SQL Server 连接到 MySQL 数据库并运行远程查询。
示例
或
If your using Microsoft SQL Server and MySQL, then you can use Microsoft SQL Server Linked Server to accomplish this. A Linked Server is a server linked via OLEDB. This linked server will allow you to connect to the MySQL database from SQL Server and run remote queries.
Example
OR
不(据我所知)。但是您也许可以从 web.config 解构连接字符串以获取数据库位置,并从那里重新创建您的 sql(在 SP 中)?
No (AFAIK). But you could perhaps deconstruct the connectionstring from your web.config to get the db location, and re-create your sql (in a SP) from there?