Help: SQL Server

Sharing my knowlege about SQL Server Troubleshooting Skills

UDL Test Series – Part 2 – Easiest way to create connection string

Posted by blakhani on March 20, 2014


In the last post (part 1) we have discussed about how to create UDL and how a basic connectivity check can be performed. Another cool thing about UDL is that it can help a developer to create connecting string for the selected provider. Here are the steps.

  • Create a blank UDL file (Refer Part 1).
  • On the first tab, choose provider. I have selected “SQL Server Native Client 11.0”

image

  • Hit Next or move to next tab “Connection” and provide necessary values. I have given server name (SRV3), selected “Use windows NT integrate security” and typed in database name as tempdb.

image

  • On “Advanced” tab, I have entered timeout as 60 (I have given some random number for demo)

image

  • On last tab “All”, we can edit rest of the parameter which can be provided in connecting sting. I have used “Application Name” in below screenshot and edited it to Balmukund

image

  • Once all necessary values are entered. Hit OK.
  • Now, open the file with “notepad” and have a look (this is the key of the trick because double click would open properties again)

image

Notice that connection string is ready and can be used in the application code. Interesting? Please comment if it was useful.

  • Cheers,
  • Balmukund Lakhani
  • Twitter @blakhani
  • Author: SQL Server 2012 AlwaysOnPaperback, Kindle
  • Advertisements

    Leave a Reply

    Fill in your details below or click an icon to log in:

    WordPress.com Logo

    You are commenting using your WordPress.com account. Log Out / Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out / Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out / Change )

    Google+ photo

    You are commenting using your Google+ account. Log Out / Change )

    Connecting to %s

     
    %d bloggers like this: