What are the steps in connecting to database ?
Answer Posted / kalirajan
// Declare Namespace as ur Lang...
In c#
Using System.Data.SqlClient;
//connection
SqlConnection con = new
SqlConnection("server=localhost;database=Grid_Db;uid=sa;pwd=;");
con.Open();
SqlCommand cmd = new SqlCommand("select * from Gtid_Tbl",con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
List the 4 common ado.net namespaces?
Explain the basic use of "dataview" and explain its methods.
What is meant by ‘transaction’ in a database and what are the ‘properties of transaction’?
Which database is the ado.net sql connection object designed for?
What are all the commands used with Data Adapter?
What providers does Ado.net uses?
What is linq and entity framework?
What is csdl entity framework?
What is serialization and de-serialization in .net? How can we serialize the dataset object?
What are the ado.net connection pooling parameters?
What is the current version of entity framework?
Which database is the ado.net?
What are ado.net objects?
What is the significance of CommandBehavior.CloseConnection ?
What is data relation?