Using the SSMS ConnectionDialog

I was attempting to add the SSMS connection dialog to my utility and ran into problems with referenced assemblies. The ConnectionDialog is documented here: https://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.ui.connectiondlg.aspx The following is a snippet using the SSMS ConnectionDialog in a C# application. Microsoft.SqlServer.Management.UI.ConnectionDlg. ConnectionDialog dlg = new Microsoft.SqlServer.Management.UI.ConnectionDlg.ConnectionDialog(); Microsoft.SqlServer.Management.Smo.RegSvrEnum. UIConnectionInfo connInfo = new Microsoft.SqlServer.Management.Smo.RegSvrEnum.UIConnectionInfo { ApplicationName = “My App”…


MS11-028 may cause issues with SQL, Exchange and PowerShell

A .NET Security Update (MS11-028) may end up causing issues with applications that make use of the .NET Framework, mostly resulting in applications being unable to launch, or loss of functionality within Native Applications that make use of .NET. In some cases, it could lead to an application crash. For this issue to occur, the…

2

Conversion issues moving from VS 2005 to VS 2008

I was asked to look at a case yesterday where the customer was hitting the following error after converting a VS 2005 Project to VS 2008. Error 3 Custom tool error: Failed to generate code. Failed to generate code. Exception of type ‘System.Data.Design.InternalException’ was thrown. Exception of type ‘System.Data.Design.InternalException’ was thrown. This was being produce…

3

How It Works: SqlDataReader::RecordsAffected and Why it Returns -1

I encountered another interesting research issue to share with you.  The documentation states RecordsAffected are for INSERT, UPDATE and DELETE but it might fool you. ———————————————————————————— Sent: Monday, June 07, 2010 9:06 PMSubject: “set nocount off”   I am trying to figure out the logic behing “set nocount”.  I want to get the row count…

1

SSIS 2005 and the .NET Garbage Collector

I was troubleshooting an SSIS Out of Memory issue the other day which led us into how the .NET Garbage Collector (GC) works.  When debugging it, I found that we were using the Workstation GC with Concurrent GC On (this is the default for .NET applications).  The following blog discusses the different flavors of the…

1

How to troubleshoot leaked SqlConnection Objects (.NET 2.0) – Part 2

In the last post in this series, we looked at how we can determine that our Connection pool was exhausted.  In this post I’m going to go a little deeper into the Internal connection itself and how we can verify if this is a closed or active connection. Dumping out the internal connection objects A…

1

How to troubleshoot leaked SqlConnection objects (.NET 2.0) – Part 1

One of my colleagues, Kamil Sykora, compiled a document that goes through how to troubleshoot leaked SqlConnection objects (from a .NET 2.0 perspective).  It was a fairly large document, so I’m not going to post the whole thing.  I’m going to split it out over several posts and base the examples off of a custom…

4