Assembly: Db;
The IProcedure interface contains properties and methods of the Procedure repository object.
IProcedure
When a new procedure is created, to ensure its correct work, determine the following minimum set of properties in the settings:
To execute the procedure and get results, open the repository object using the IMetabaseObjectDescriptor.Open or IMetabaseObjectDescriptor.OpenWithParam method and cast it to the ISQLCommandInstance interface. If procedure is parametric, the set of parameters for opening can be created using the IMetabaseObjectParams.CreateEmptyValues method. Parameters with the Output or Function Result type will be available in created set of parameters after executing the ISQLCommandInstance.Execute method.
On creating the Procedure object in repository, the stored procedure/function will be created on DBMS server. It can be also used with the DAL assembly resources, the example of use is given in theExecuting Stored Procedures and Functions article.
NOTE. On executing a big number of procedures and procedures with output parameters, it is recommended to use the DAL assembly resources and not the ISQLCommandInstance interface.
Property name | Brief description | |
External | The External property returns whether the procedure is external. | |
ForceCreate | The ForceCreate property determines whether it is possible to create incorrect procedure. | |
Kind | The Kind property determines the type of created object: function or procedure. | |
NativeName | The NativeName property determines a physical name of procedure in a database. |
Property name | Brief description | |
Database | The Database property determines the database where DBMS command is stored. | |
Text | The Text property determines the text of SQL query for certain DBMS driver. |
Method name | Brief description | |
AlterProcedure | The AlterProcedure method updates the procedure text in a database according to the procedure text in repository. | |
AttachProcedure | The AttachProcedure method updates information about procedure structure in a repository, according to procedure structure on a database server. | |
CreateProcedure | The CreateProcedure method creates a procedure in the database on the basis of available metadata. | |
DropProcedure | The DropProcedure method removes a procedure from database on server. | |
Refresh | The Refresh method completes the update by saving all changes. | |
UpdateProcedure | The UpdateProcedure method updates the structure of procedure on a database server according to structure of current procedure. |
Method name | Brief description | |
ClearText | The ClearText method clears the operator of DBMS command. |
See also: