70-516 · Question #135
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create a Windows Forms application. The application connects to a Microsoft SQL Server database. You need to find out whether…
The correct answer is A. string instanceName = Assembly.GetEntryAssembly().FullName. NumberOfNonPooledConnections The number of active connections that are not pooled. NumberOfReclaimedConnections The number of connections that have been reclaimed through garbage collection where Close or Dispose was not called by the application. Not explicitly closing or…
Question
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create a Windows Forms application. The application connects to a Microsoft SQL Server database. You need to find out whether the application is explicitly closing or disposing SQL connections. Which code segment should you use?
Options
- Astring instanceName = Assembly.GetEntryAssembly().FullName;
- Bstring instanceName = Assembly.GetEntryAssembly().GetName().Name;
- Cstring instanceName = Assembly.GetEntryAssembly().FullName;
- Dstring instanceName = Assembly.GetEntryAssembly().GetName().Name;
How the community answered
(45 responses)- A78% (35)
- B7% (3)
- C2% (1)
- D13% (6)
Explanation
NumberOfNonPooledConnections The number of active connections that are not pooled. NumberOfReclaimedConnections The number of connections that have been reclaimed through garbage collection where Close or Dispose was not called by the application. Not explicitly closing or disposing connections hurts performance. Use of ADO.NET performance counters
Topics
Community Discussion
No community discussion yet for this question.