SQL Server Q&A

As a software engineer, I focus on .NET, especially asp.net, C#, WCF and so on, and I am also very interested in Search Engine Optimization.

Entries Tagged ‘microsoft visual c’

Error message when you try to reinstall SQL Server 2005 after you uninstall a clustered instance of SQL Server 2008: “This application has failed to start because the application configuration is …

Symptoms
You upgrade a clustered instance of Microsoft SQL Server 2005 to Microsoft SQL Server 2008. Then, you uninstall the clustered instance of SQL Server 2008 and all the remaining components of SQL Server 2005. When you try to reinstall SQL Server 2005, you receive the following error message:

This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.
Resolution
This problem occurs because the runtime components of Microsoft Visual C++ 2005 Service Pack 1 (SP1) are uninstalled when you uninstall SQL Server 2008. When you uninstall SQL Server 2008, the cluster resource files (.dll files) are not uninstalled and are shared by the later SQL Server 2005 installation. However, the runtime components of Visual C++ 2005 SP1 are required for you to use these .dll files.
When you install a clustered instance of SQL Server 2005, these .dll files are used to cluster the instance. However, SQL Server 2005 includes only the release version of the Visual C++ 2005 runtime. Therefore, an error occurs when the Setup program tries to load these .dll files.

Description of the Microsoft application blocks for .NET topic: “Data Access Application Block Overview”

Symptoms
This article discusses the Microsoft Application Block for .NET topic: “Data Access Application Block Overview.”
The Data Access Application Block is a Microsoft .NET Framework component that contains optimized data access code that can help you do the following:Call stored procedures. Issue SQL text commands against a SQL Server database. The Data Access Application Block returns the SqlDataReader object, the DataSet object, and the XmlReader object. You can use the Data Access Application Block as a building block in your own .NET Framework-based application to reduce the quantity of custom code that you must create, test, and maintain.
Resolution
“Data Access Application Block Overview”contains the following sections: Introduction
The Data Access Application Block encapsulates performance best practices and resource management best practices for how to gain access to Microsoft SQL Server databases. You can use the Data Access Application Block as a building block in your own .NET Framework-based application. The Data Access Application Block reduces the quantity of custom code that you must create, test, and maintain. The Data Access Application Block helps you to do the following: Call stored procedures or SQL text commands.Specify parameter details.Return the SqlDataReader object, the DataSet object, and the XmlReader object.Use strongly typed datasets.What Does the Data Access Application Block Include?
The Data Access Application Block component includes the Microsoft Visual Basic .NET source code or the Microsoft Visual Basic 2005 source code and the Microsoft Visual C# .NET source code or the Microsoft Visual C# 2005 source code for the Data Access Application Block. It also includes a Quick Start Samples client application in each language that you can use to test common scenarios. The sample can help you to better understand how the Data Access Application Block works. You can also customize the source code to fit your requirements.Downloading and Installing the Data Access Application Block
This section discusses how to download and to install the Data Access Application Block. A Microsoft Windows Installer file that contains the signed Data Access Application Block assembly and the comprehensive documentation is available. The install process creates a Microsoft Application Block for .NET menu on your Programs menu. The Data Access menu that appears on the Microsoft Application Block for .NET menu includes options to start the documentation and to start the Data Access Application Block Visual Studio .NET or Visual Studio 2005 solution.Using the Data Access Application Block
This section discusses how to use the Data Access Application Block to run database commands and to manage parameters.Internal Design
This section discusses the internal design of the Data Access Application Block. The Data Access Application Block includes the full source code and a comprehensive guide to its design. This section describes the main implementation details.

BUG: Access Violation Occurs When You Debug Stored Procedure

Symptoms
The following error message may be returned to a Transact-SQL debugger, and reported in the SQL Server Errorlog, when you attempt to debug a Transact-SQL statement or a stored procedure:

SqlDumpExceptionHandler: Process %i generated fatal exception c0000005
EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.The preceding error message appears in the Transact-SQL debugger included with Microsoft Visual C++, while the following error message appears in the Transact-SQL debugger included with Microsoft Visual Basic:

Process %i generated fatal exception c0000005Because the client applications parse the error message, the exact error message may vary from client to client. The Transact-SQL debuggers included in various development environments in this case.
Resolution
This error message occurs when the Configuration Function @@Servername returns Null.
To verify this, open Query Analyzer, connect to the server, and then run the following statement:

Select @@Servername Normally, this code returns the Microsoft Windows NT machine name of the server.