Since you haven't posted anything that's related to the insertion in the database, the list of the steps are:
- Open a connection, see:
SqlConnection[
^]
- Create an
SqlCommand[
^]
- Add proper parameters, see
SqlParameter[
^]
- Set the values of the parameters
- Start a transaction, see
SqlTransaction[
^]
- Execute the command
- Commit or rollback the transaction depending on the success of the execution
- Close the connection
- Dispose the objects