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
Explain why canot we use multiple inheritance and garbage collector paralelly in .net?
Explain the basic use of "dataview" and explain its methods.
Data reader read and forward only, how is it possible to get 2 tables of data at a time?
Which one of the following objects is a high-level abstraction of the connection and command objects in ado.net?
What are the main differences between classic ado and ado.net?
Explain the different row versions available in table?
How to add a check box or a dropdown list to a column in a datagrid?
What is the difference between the clone() and copy() methods of the dataset class?
What are the difference between readonly vs. Const?
What is ado full form?
What is difference between datareader and dataadapter?
What do you know about ado.net's objects?
What is aggregating data ?
How to check if the Dataset has records ?
Define different execute methods of ADO.NET command object ?