Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Write steps of retrieving data using ado.net ?

Answer Posted / sudheer lakkireddy

Take a gridview control in ur design
add
using system.data.sqlclient;
using.system.data;
// give a connection string to database

sqlconnection con= new sqlconnection("conn");

//in button click event write following

sqldataadapter da=new sqldataadapter("select * from
(tablename)",con);
dataset ds=new dataset();
da.fill(ds,"tablename");
gridview1.datasource=ds;
gridview1.datamember="tablename";
gridview1.databind();

try out this

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which method is used to sort the data in ADO.Net?

1973


What is the use of connection object in ado.net?

1053


What are dcl commands?

1005


If a table contains 20000 records . In a page at each time 100 records to be displayed what are the steps you will take to improve performance? Will you use dataset or datareader?

1053


What are the connected and disconnected modes in ado.net?

909


How to enable and disable connection pooling?

1044


How we can provide data to ado.net?

1035


Which one of the following objects is a high-level abstraction of the connection and command objects in ado.net?

1064


What is dataset and datatable in ado.net?

982


Explian About DataAdapters

1016


How to add a javaScript function in a datagrid?

1121


How is entity framework different from ado.net?

943


What are the steps you will take to improve performance? Will you use dataset or datareader?

983


How do we use stored procedure in ADO.NET and how do we provide parameters to the stored procedures?

966


What are the different ado.net namespaces?

1055