Connection Stream - Do you use a UDL when getting database settings?
  v4.0 Posted at 17/03/2017 3:22 AM by Tiago Araujo

Why do people always invent ways of getting the same old server name and a database name? Look at this image from Speed Ferret - one of my favorite SQL Server utilities.

Custom database connection screen
Figure: Bad Example - Custom database connection screen in Speed Ferret
While a nice form, it would have taken quite some developer time to get it right. Not only that, it is a little bit different than what a user has seen before. Now look at this UDL from one of our utilities SSW SQL Auditor:
Standard Microsoft UDL dialog
Figure: Good Example - Standard Microsoft UDL dialog
Every developer has seen this before - so use it. Better still, it is only a few lines of code: B-Open UDL Dialog-DH.txt
 Visual Studio .NET 2005 Microsoft are yet to release an API
Figure: Coming in Visual Studio .NET 2005 Microsoft are yet to release an API to do this


The above cannot be used when you want the user to create a new database. Microsoft does not supply an out of the box UI and there is no third party solution. Only in this case you have to create your own form.
SQL Deploy uses its own custom form
Figure: SQL Deploy uses its own custom form for "selecting" a database name

Related rules

    Do you feel this rule needs an update?

    If you want to be notified when this rule is updated, please enter your email address: