Category Archives: ASP.Net – SQL Server

ASP.Net – SQL Server Database Connection using LINQ method.

How to use LINQ in ASP.NET Web Application with C#. Connectivity between ASP.Net and SQL - Server using LINQ.

Windows Application Connectivity with SQL-Server using DataAdapter in ASP.Net C#

Databse Connection in Windows Application with ms sql server. DataBase Connectivity between Windows Application and mssql server using SQLConnection and DataAdapter in ASP.Net.

Windows Application Connectivity with SQL-Server using Wizard in ASP.Net C#

DataBase Connection in Windows Application with ms sql server using TableAdapter and StoredProcedure through Wizard in ASP.Net. Insert Data to ms sqlserver in Windows Application.

Connection Between ASP.Net and SQL-Server using SQLCommand

How to make connection between ASP.Net and SQL-Server using SQLCommand, SQLDataAdapter and SQLStoredProcedure in C#.

ASP.Net – SQL Server Database Connection using SqlDataAdapter method.

ASP.Net -SQL Server Connectivity using SqlDataAdpater method. connection between asp.net and sql server management studio 2008.

Databse Connection between ASP.Net and SQL-Server using Wizard

Database Connectivity between ASP.Net and SQL-Server

There are many method to make connection between ASP.Net and SQL-Server.

1. Connection using TableAdapter and StoredProcedure thought Wizards.
2. Connection using SQLCommand  and SQLDataAdapter using StoredProcedure .
3. Connection using SQLDataAdapter and SQLConnection writing query in webpage.

STEP 1 – Open the SQL-Server and Create New Database for connectivity.
Now Create New Table “UserMst” in Database Example.

STEP 2 – Create Stored Procedure for Select Data.

Fiil up the Record in Created Table named UserMst

read more

ASP.Net with SQL-Server Connection

  • There are many method for connecting ASP.Net Application to SQL-Server.
  • We are discussing basic three method below for connection.
    Method I
    Step 1 -   Import  Namespace

                using System.Data.Sql;

using System.Data.SqlClient;


Step 2 – Delcare SqlConnection
(Make Connection between Asp.Net Application to Sql Server)
string  strconn = “Data Source=COMPUTERNAME\\SQLEXPRESS;Initial Catalog=’DataBaseName’;Integrated Security=True”;

SqlConnection SqlConn = new SqlConnection(strconn);


Step 3 – Declare SqlDataAdapter
(SqlDataAdapter is a Bridge between DataBase and DataSet/DataTable)
SqlDataAdapter SqlAdapter = new SqlDataAdapter(“select * from Table”, SqlConn);


Step 4 – Declare DataSet/DataTable and fill the data from DataAdapter
DataTable DT = new DataTable();
            SqlAapter.Fill(DT);

read more