Зміст курсу
Introduction to .NET with C#
Introduction to .NET with C#
2. Asynchronous Programming and Introduction to Web Services
3. Introduction to Databases with .NET
Stored Procedures
Important Points
- A Stored Procedure is a set of SQL commands. Each Stored Procedure has a unique name, and it acts like a function. Therefore, it can be called or executed like a function;
- Stored Procedures can be created using the
CREATE PROCEDURE
statement; - Stored Procedures can be executed using the
CALL
statement; - We can use the
ExecuteReader
orExecuteNonQuery
methods of theMySqlCommand
object for calling a Stored Procedure; - If the Stored Procedure has an OUT parameter (a parameter which has an
out
keyword before it), we need to manually specify the values for its arguments using theAddWithValue
andAdd
methods of theMySqlCommand
'sParameter
attribute; - The direction of an
out
parameter of a Stored Procedure must be set toParameterDirection.Output
before executing the Stored Procedure.
Все було зрозуміло?