Description
Creates a new object of the IAQAStoredProc
type (an analogue of the VCL TStoredProc
type).
Note: | This method requires the Borland Database Engine to be installed on your computer. |
Declaration
BDE.CreateStoredProc()
Result | An IAQAStoredProc object |
Applies To
The method is applied to the following object:
Result Value
An object of the IAQAStoredProc
type.
Remarks
The IAQAStoredProc
object provides the same functionality for scripts as a TStoredProc
object does in VCL applications. It implements the same methods and properties, under the same names. See the VCL documentation for TStoredProc
.
Once the IAQAStoredProc
object is created, you can use it to execute stored procedures. To do this:
- Specify the database for which the procedure is stored (the
DatabaseName
property). - Specify the name of the stored procedure (the
StoredProcName
property). - If necessary, specify parameters for the procedure (the
Params
property). - Execute the procedure using the
Open
orExecProc
methods.
Example
The code below creates a new stored procedure and specifies its name.
JavaScript, JScript
function CreateStoredProc()
{
// Creates the procedure
var Proc = BDE.CreateStoredProc();
// Specifies the procedure name
Proc.StoredProcName = "DEMODPROC";
// Specifies procedure parameters
// ...
// ...
}
Python
def CreateStoredProc():
# Creates the procedure
Proc = BDE.CreateStoredProc()
# Specifies the procedure name
Proc.StoredProcName = "DEMODPROC"
# Specifies procedure parameters
# ...
# ...
VBScript
Sub CreateStoredProc
' Creates the procedure
Set Proc = BDE.CreateStoredProc
' Specifies the procedure name
Proc.StoredProcName = "DEMODPROC"
' Specifies procedure parameters
' ...
' ...
End Sub
DelphiScript
function CreateStoredProc;
var Proc;
begin
// Creates the procedure
Proc := BDE.CreateStoredProc();
// Specifies the procedure name
Proc.StoredProcName := 'DEMODPROC';
// Specifies procedure parameters
// ...
// ...
end;
C++Script, C#Script
function CreateStoredProc()
{
// Creates the procedure
var Proc = BDE["CreateStoredProc"]();
// Specifies the procedure name
Proc["StoredProcName"] = "DEMODPROC";
// Specifies procedure parameters
// ...
// ...
}