Data Adapter
-
Hi all, i am trying to learn .Net Techonolgy. please can anyone tell me how you fill a table with data from a database.? i know we can use Data adapter to fill the data from the dataset. but i want to know this with sample example. thanks in advance, Rahi
If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
-
Hi all, i am trying to learn .Net Techonolgy. please can anyone tell me how you fill a table with data from a database.? i know we can use Data adapter to fill the data from the dataset. but i want to know this with sample example. thanks in advance, Rahi
If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
-
Hi all, i am trying to learn .Net Techonolgy. please can anyone tell me how you fill a table with data from a database.? i know we can use Data adapter to fill the data from the dataset. but i want to know this with sample example. thanks in advance, Rahi
If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
use System.Data.SqlClient; SqlConnection conn = new SqlConnection("Data Source=....;Initial Catalog="databasename";User Id=sa;password=;"); SqlCommand cmd= new SqlCommand("Select * from customer", conn); SqlDataAdapter adp=new SqlDataAdapter(cmd); DataSet ds=new DataSet(); adp.fill(ds,"TableAliasName"); now ds contain data from table in database. if u want display data in grid then GridView1.DataSource=ds; GridView1.DataBind();
anujsharma