快速测试OLE DB连接字符串的方法 [英] Quick ways to test OLE DB Connection String

查看:423
本文介绍了快速测试OLE DB连接字符串的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了调试的目的,我想知道如何快速测试OLE DB连接字符串。

For debugging purpose I'd like to know ways to test OLE DB connection string quickly.

我发现了这个免费软件,它在我的机器上工作,测试成功。

I've found this free software, it works on my machine, tested successfully.

有没有更快的方式,也许从Windows上的命令行?因为大多数时候,客户端而不是我将执行此任务,所以我更喜欢零安装的方法,将影响他们的系统至少。

Is there a even quicker way to do so, maybe from command line on Windows? Because most of the time, it is the client rather than me that would do this task, so I prefer a "zero-installation" approach that would impact their system the least.

推荐答案

如果客户端安装了PowerShell(如果它们运行的​​是Windows 7或Windows Server 2008 R2),那么您可以从PowerShell控制台窗口执行这些命令:

If the client has PowerShell installed (a given if they are running Windows 7 or Windows Server 2008 R2), then you can execute these commands from a PowerShell console window:

$conn = New-Object System.Data.OleDb.OleDbConnection
$conn.ConnectionString = "Provider=Search.CollatorDSO" # whatever you are testing
$conn.Open()
$conn.Close()

这篇关于快速测试OLE DB连接字符串的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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