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
Which method is used to sort the data in ADO.Net?
What is the use of connection object in ado.net?
What are dcl commands?
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?
What are the connected and disconnected modes in ado.net?
How to enable and disable connection pooling?
How we can provide data to ado.net?
Which one of the following objects is a high-level abstraction of the connection and command objects in ado.net?
What is dataset and datatable in ado.net?
Explian About DataAdapters
How to add a javaScript function in a datagrid?
How is entity framework different from ado.net?
What are the steps you will take to improve performance? Will you use dataset or datareader?
How do we use stored procedure in ADO.NET and how do we provide parameters to the stored procedures?
What are the different ado.net namespaces?