Thursday, June 7, 2007

How to Create a Microsoft Universal Data Link (UDL)

I was having a hard time configuring my OLEDB connection to DB2 using the Microsoft OLEDB Provider for DB2. As I was going through the net, posts regarded the IBM OLEDB Provider for DB2 a much easier alternative than the MS counterpart. Using a UDL file for the connection string was also recommended.

I've tried searching for the IBM OLEDB Provider for DB2 but didn't find any match for a download. Instead I downloaded and installed the DB2 client to get the IBM provider.

I was not familiar with the UDL file and so I searched for ways to create one. Most posts said to right-click on the selected folder and pick Microsoft Data Link from the New menu. I was stomped since I didn't have that feature. (My OS is WinXP Pro.) Good thing I found this MSDN article which stated how to create a UDL file manually.

So I configured my OLEDB connection by clicking the "DataLinks..." button and selecting my pre-defined UDL file. Voila, the data link configured the connection string automatically and I just had to click Ok.

No comments:

Your Ad Here