Connection to the Server


Microsoft SQL Server and Visual Studio .NET


Introduction to SQL Server

A database is a list-based application as a collection of information destined to make that information easy to view and exploit. The word database primarily suggests a fancy and powerful programming environment used to create such an application. With today's requirements, the expectation is certainly justified. Consequently, there are many software packages used to create database applications. On this site, we will use Microsoft SQL Server.


SQL Server and Visual Studio .NET

Microsoft SQL Server is mainly used to create and maintain computer databases. It doesn't provide the means of creating graphical elements that would make it easy for a regular user to take advantage of its lists. To create an application made of graphical user interface (GUI) objects, you must use a separate environment. To make this easy, Microsoft created a very direct link between Microsoft Visual Studio .NET and Microsoft SQL Server. The communication is so smooth that, from Microsoft Visual Studio .NET, you can use Microsoft SQL Server directly without having to formally open SQL Server.

Introduction to ADO.NET

ADO.NET is a group of libraries used to create powerful databases using various sources that include Microsoft SQL Server, Microsoft Access, Oracle, XML, etc. ADO.NET relies on the .NET Framework's various classes to process requests and perform the transition between a database system and the user. The operations are typically handled through the DataSet class. While ADO.NET is the concept of creating and managing database systems, the DataSet class, as we have introduced it so far, serves as an intermediary between the database engine and the user interface, namely the Windows controls that the user uses to interact with the computer. Still, remember that a DataSet object is used to manage lists, any lists, not just those created using database environments such as Microsoft SQL Server or Microsoft Access.

Besides using features of a database in an ADO.NET application, you can also fully take advantage of XML as it is completely and inherently supported by the DataSet class. To fully support XML in your application, we saw in previous lessons that the .NET Framework is equipped with the System.Xml.dll library. You may have noticed that, in previously lessons, to use XML, we never had to import any library. This was possible because, if you create a Windows Forms Application using the New Project dialog box, the System.Xml.dll namespace is directly included in your application. The classes that implement XML in the .NET Framework are defined in the System.Xml namespace.

Getting Access to ADO.NET Libraries

The classes used to create ADO.NET databases are defined in the System.Data namespace and are stored in the System.Data.dll library. If you create a Windows Forms Application from the New Project dialog box, Visual Studio .NET would automatically include the System.Data.dll library and add the System.Data namespace to your project, even if you are not creating a database application. This makes it convenient. If you are creating the application from scratch, in order to use ADO.NET, you must remember to reference the System.Data.dll library and include the System.Data namespace in your file(s).


Previous Copyright © 2005-2016, FunctionX Next