Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
408 views
in Technique[技术] by (71.8m points)

.net - 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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The following method has proven useful for me. It's super quick and practical and doesn't require PowerShell:

  • Open up Notepad and create an empty text file, then click File -> click Save -> and save it with the File name: TestConnection.udl to your desktop.
  • Go to your desktop and double-click on the TestConnection.udl file you just created and the Data Link Properties box will popup.
  • Select the Provider tab and Find the provider that you want to connect with and click Next >>.
  • Now from the Connection tab, select or enter your source/ server name -> then enter information to log on to server -> and select the database on the server.
  • Click Test Connection and click OK to save the file. If errors occur during testing of your connection string, you will get a popup box with the error message.

Walkthrough (same as above but with images)

Open up Notepad and create an empty text file, then click File -> click Save -and save it with the File name: TestConnection.udl to your desktop:

enter image description here

Go to your desktop and double-click on the TestConnection.udl file you just created and the Data Link Properties box will popup.

enter image description here

Select the Provider tab and Find the provider that you want to connect with and click Next >>.

enter image description here

Now from the Connection tab, select or enter your source/ server name -> then enter information to log on to server -> and select the database on the server.

enter image description here

Click Test Connection and click OK to save the file. If errors occur during testing of your connection string, you will get a popup box with the error message.

enter image description here

Source


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...