Table of Contents Previous Next


3 Using the .NET Connector : 3.6 Using SPL Stored Procedures in your .NET Application : 3.6.1 Example - Executing a Stored Procedure without Parameters

Our sample procedure prints the name of department 10; the procedure takes no parameters, and returns no parameters. To create the sample procedure, invoke EDB-PSQL and connect to the Advanced Server host database. Enter the following SPL code at the command line:
The CommandType property of the EDBCommand object is used to indicate the type of command being executed. The CommandType property is set to one of three possible CommandType enumeration values:
Use the default Text value when passing a SQL string for execution.
Use the StoredProcedure value, passing the name of a stored procedure for execution.
Use the TableDirect value when passing a table name. This value passes back all records in the specified table.
The CommandText property must contain a SQL string, stored procedure name, or table name depending on the value of the CommandType property.

3 Using the .NET Connector : 3.6 Using SPL Stored Procedures in your .NET Application : 3.6.1 Example - Executing a Stored Procedure without Parameters

Table of Contents Previous Next