Sequence to connect and retrieve data from database useig
dataset ?
Answer Posted / ramakrushna
SqlConnection con = new SqlConnection();
con.ConnectionString = "server=munapc;
database=project1; User ID=sa; Password=niit";
con.Open();
string query = "select * from emp";
SqlDataAdapter da = new SqlDataAdapter(query, con);
SqlCommandBuilder cmd = new SqlCommandBuilder(da);
DataTable dt = new DataTable();
da.Fill(dt);
dataGridView1.DataSource = dt;
con.Close();
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Explain the overview of ado.net architecture?
How to read data with the sqldatareader ?
What is a non query?
What is sql connection in ado.net?
What is connected architecture in ado.net?
What is openrowset?
Which is faster ado.net or linq?
What is a control toolbox?
What are the key features of ado.net?
What is ado connection?
Which is faster entity framework or ado.net?
What are good ado.net object to replace to ado recordset object.
What are the types of databinding?
Which method is used by command class to execute SQL statements that return single value?
List the 4 common ado.net namespaces?