User Guide

94 The Database API
The following values return:
columnArray[0] = "EmpID", columnArray[1] = "LastName",¬
columnArray[2] ="startDate", columnArray[3] = "salary"
MMDB.getSPParameters()
Availability
Dreamweaver MX.
Description
This function returns an array of parameter objects for a named procedure.
Arguments
connName, procName
The connName argument is a connection name that is specified in the Connection
Manager. It identifies the connection string that Dreamweaver should use to make a
database connection to a live data source.
The procName argument is the name of the procedure.
Returns
An array of parameter objects, each specifying the following set of properties:
Example
The following example retrieves the parameter objects for the specified procedure and creates
a tooltip for each object using its properties.
var paramNameObjs = MMDB.getSPParameters(connName,procName);
for (i = 0; i < paramNameObjs.length; i++)
{
var paramObj = paramNameObjs[i];
Property name Description
name
Name of the parameter (for example, @@lolimit)
datatype
Datatype of the parameter (for example, smallmoney)
direction
Direction of the parameter:
1-The parameter is used for input only.
2–The parameter is used for output only. In this case, you pass the
parameter by reference and the method places a value in it. You
can use the value after the method returns.
3– The parameter is used for both input and output.
4– The parameter holds a return value.
000_DW_API_Print.book Page 94 Wednesday, July 20, 2005 11:58 AM