Filtering Data

July 7, 2009

There are two methods for filtering data:  Creating parameterized queries: By using parameterized queries, data can be filtered based on the criterion entered by a user at run time. Parameterized queries can be used in any situation where you need database operations to be executed on the SQL Server.  Filtering data using controls [...]

0

Introducing Data Binding:

July 5, 2009

The binding of data with the controls of a windows form is known as data binding. Data binding is the ability to bind some elements of a data source with the controls of an application. There are two types of data binding: Simple Data Binding: It is a process of binding a control, such as [...]

0

Type of event in SqlConnection:

July 4, 2009

There are two types event in SqlConnection are StateChange event: Occurs when the state event of the connection changes. The eventhandler receives an argument of type StateChangeEventArgs. This argument contains data related to that particular event. The following properties of the StateChangeEventArgs: CurrentState: It is used to get the new state of the connection. OriginalState: [...]

0

Closing the Connection Object

July 1, 2009

After executing the commands that you want to execute, you should close the connection. The connection to the database can be closed using the Close () method on the connection object. Create an object of the SqlConnection class: SqlConnection connection = new SqlConnection (); Create a connection string to the HR database: Connection.ConnectionString = ”Data [...]

0

Executing SQL Statements in the Command Object:

June 30, 2009

To execute the query passed in the command object, you can call its methods. The following code snippets explain how to execute SQL statements in a command object: Create an object of the SqlConnection class: SqlConnection connection = new SqlConnection (); Create a connection string to the HR database: Connection.ConnectionString = ”Data Source = SQLSERVER01;Intial [...]

0

Opening the Connection Object

June 29, 2009

After you have defined the connection string, you need to open the connection by using the open () method. The open () method uses the information in the ConnectingString property of the Connection object to connection to the data source and establish a connection. Create an object of the SqlConnection class: SqlConnection connection = new [...]

0

Creating a command object in ADO.NET:

June 28, 2009

Once established the connection in a data source. You can execute commands and return results from the data source using a commands object. To execute SQL statements, you need to create an instance of the SqlCommand class in the System.Data.SqlClient namespace. The command object specifies the SQL statement that need to be executed and the [...]

0

Creating a connection Object in ADO.NET

June 24, 2009

The connection component of a provider is used to establish a connection with a data source. To move data between a data source and a client application, you must first create a connection object and provide a connection string for this object. To connection to a Microsoft SQL Server database, you use the sqlConnection class [...]

0

Dataset

June 22, 2009

Dataset is a memory based relational representation of data. A data is a part of the disconnected environment. A dataset is a disconnected, cached set of records that are retrieved from a database. A dataset contains a collection of one or more data table objects made up of rows and columns of data as well [...]

0

Data Provider

June 20, 2009

A Data Provider is used for connecting to a database, retrieving data, storing the data in a dataset, reading the retrieved data, and updating the database. Selecting an appropriate data provider for a client application depends on the type of data source that is being accessed. The four main types of data providers are: .NET [...]

0