It is said that the stored procedure is very simple to use, but the code to access it is quite tedious, but it is okay that you just need to clarify your ideas, this is not a problem, the simple Applet in the book explains how to create and call a stored procedure to create a stored procedure. The SQL statements of all columns of the ID returned are as follows: SELECT id, lname, fname, phone, address, city, state, zip, contract FROM authors WHERE id = whatever author ID we want create a stored procedure for the stored procedure transfer parameter. If the variable uses @ as the prefix, the SQL statement is as follows: SELECT id, lname, fname, phone, address, city, state, zip, contract FROM authors WHERE Id = @ id Note: A stored procedure can create an SQL statement, it can also be a set of complex statements. The T-SQL supports branch, loop, and other variable declarations, which will help compile some very complex Stored Procedure Code back to the example of the stored procedure knowledge line of SQL code, when we want to declare the Stored PROCEDURE for transmitting the parameter @ id and process name example, the SQL code is AS follows: CREATE PROCEDURE example @ id varchar (11) AS SELECT id, name, phone, address, city, state, zip, contract FROM authors WHERE Id = @ id and save the stored procedure in the database, you can access this stored procedure in the Code. To call the stored procedure, first create the stored procedure in the database. As mentioned above, the stored procedure is then created with the SqlCommand object, and initialize the SqlCommand object [html] <span style = "font-size: 18px;"> SqlCommand cmd = new SqlCommand (); cmd. C OmmandText = "example"; // specifies the stored procedure to be called. cmd. CommandType = CommandType. StoredProcedure; // specifies that the SQL command type is stored procedure. The default value is SQL statement. Cmd. connection = con; // set the Connection <span style = "background-color: white; font-family: Arial; line-height: 19pt; "> </span> Add the Stored Procedure Parameter [html SqlParameterparam = new SqlParameter (); // define a parameter object param to the SqlCommand object. parameterName = "@ id"; // name of the stored procedure parameter param. value = txtID. text. trim (); // the value of this parameter cmd. parameters. add (param); // SqlCommand object Add this parameter object param = new SqlParameter ("name", txtName. text. trim (); cmd. parameters. add (param); Use the qlCommand object to call the SQL Execution function. executeNonQuery (); ADO.. NET ......