How to Inserting Data when using SqlCommand Object in ADO.Net?

How to Inserting Data when using SqlCommand Object in ADO.Net?

To insert data into a database, use the ExecuteNonQuery method of the SqlCommand object. 
Instantiate a new command with a query and connection
SqlCommand cmd = new SqlCommand(insertString, conn);
 
Call ExecuteNonQuery to send command
cmd.ExecuteNonQuery();

By:Aditya
Date:2028-10-10 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related ADO.NET Subjective Links

ADO.NET Subjective interview questions and answers for experienced and fresher