Posts

Showing posts from December, 2011

Using ADO.Net(with C#.Net) to communicate with SQL Server 2008

Image
            Hello friends, am very happy to share this small thing to you all, This might be small thing but, this is base to all Database connection and manipulation. here i used the ADO.Net with fully coded (instead of Data binding)connection, so that every one can understand easily. Prerequisites MS SQL Server (any version) Visual Studio 2008 Source Code using System.Data.SqlClient; //we are going to connect with sql server so we need to import the sqlclient namespace using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace sameple_DB {     public partial class Form1 : Form     {         SqlConnection vCon = new SqlConnection("Data Source=srm2;Initial Catalog=sample;Persist Security Info=True;User ID=sa;Password=adminsql");         //creating Connection with Connection string         //Here i used SQL S