What is sql command in ado net?



What is sql command in ado net?..

Answer / Chandra Mohan Jha

The SQL command in ADO.NET is executed using the Connection object's CreateCommand() method. Here's an example:
```
SqlConnection connection = new SqlConnection("Data Source=(local);Initial Catalog=Northwind;Integrated Security=True");
SqlCommand command = new SqlCommand("SELECT * FROM Customers", connection);
connection.Open();
SqlDataReader reader = command.ExecuteReader();
// Process the data
connection.Close();
```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More ADO.NET Interview Questions

What is main five diffrent between Connected And Disconnected environment

15 Answers   HCL, Satyam, US India, Wipro,


What is meant by ‘transaction’ in a database and what are the ‘properties of transaction’?

1 Answers  


What is the full form of ado?

1 Answers  


How is entity framework different from ado.net?

1 Answers  


What is shadow copy?

1 Answers  


What is the difference between ado.net and oledb?

1 Answers  


What is openquery?

1 Answers  


How to Handle the exceptions in Sqlsrver2000

3 Answers   SQL Star,


What is microsoft ado.net?

1 Answers  


What is Debug.write does?

1 Answers  


What are relation objects in dataset and how & where to use them?

1 Answers  


What is dataset and datatable in ado.net?

1 Answers  


Categories