Function.ODBC.Connection!conname.RunStoredProcRstLocal
This executes the specified stored procedure, against the specified database connection, and returns the results in the specified recordset.
Contents
Syntax
Function.ODBC.Connection.RunStoredProcRstLocal(stored proc name [String], recordset name [String])
Function.ODBC.Connection.RunStoredProcRstLocal(stored proc name [String], recordset name [String], param names [String], param types [Long], param sizes [Long], param vals [String])
Arguments
stored proc name
[String]
recordset name
[String]
param names
[String]
List of Input and Output parameters that needs to be passed to the stored procedure. It is a good practice to match these names with the parameter names in the stored procedure definition.
param types
[Long]
Datatype of the parameters.
0 - Boolean
1 - Date-Time
2 - Float
3 - Integer
4 - String
param sizes
[Long]
Size of the I/O parameters. By convention, this size should match the parameter size in the procedure definition, and 0 is used for integers.
param vals
[String]
Values for the input parameters. Blank string should be passed for output parameter.
Examples
Function.ODBC.Connection!Conn.RunStoredProcRstLocal("GetVendorInfo","rstVendorInfoLocal","Vendor",4,6,"100845")
Remarks
- The difference between Function.ODBC.Connection!conname.RunStoredProcRst and Function.ODBC.Connection!conname.RunStoredProcRstLocal is the local version creates a local scope recordset, while the base version creates a global scope recordset. Local recordsets are generally superior, since you can't run into duplication issues when you have recordsets opened in event-based code.