Sequence to connect and retrieve data from database useig
dataset ?
Answer Posted / a.anwar sadat
public SqlConnection con = new SqlConnection("server=anwar;
uid=sa; pwd=s;database=Employee;");
public SqlCommand cmd;
public SqlDataAdapter da;
public DataSet ds;
cmd = new SqlCommand("select * from empdetails", con);
da = new SqlDataAdapter(cmd);
ds = new DataSet();
da.Fill(ds, "empdetails");
foreach(DataRow dr in ds.Tables["empdetails"].Rows)
{
txtempname.Text = dr["name"].ToString();
txtdob.Text = dr["dob"].ToString();
txtstreetname.Text = dr["street"].ToString();
} // foreach
| Is This Answer Correct ? | 13 Yes | 6 No |
Post New Answer View All Answers
The answers which posted above is not satisfied my requirement? Can some one post teh exact answer? Thanx
What is the functionality of data provider in ado.net?
What is the use of adodc?
What is row state?
Explian About DataAdapters
What is ole in excel?
What is the meaning of executenonquery?
Describe connection object in ado.net
Why do we need ado.net?
What does ado stand for in ado.net?
What are the ado.net connection pooling parameters?
Explain how to bind the controls(best practice) comboboxes to the data in the dataset?
Explain the difference between sqlcommand object and command behavior object?
Which database is the ado.net?
What is serialization and de-serialization in .net?