Search code examples
.netconnection-stringoledbdatabase-connection

Quick ways to test OLE DB Connection String


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.

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.


Solution

  • 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()