Mmdb.getspparameters() – Adobe Dreamweaver API Reference CS5 User Manual
Page 78
73
DREAMWEAVER API REFERENCE
The database API
Last updated 8/27/2013
Returns
An array of strings that represents the list of columns. This function returns an error if the SQL statement or the
connection string is invalid.
Example
The following code can return a list of result set columns that are generated from the executed stored procedure,
getNewEmployeesMakingAtLeast
:
var paramNameArray = new Array("startDate", "salary")
var paramValueArray = new Array("2/1/2000", "50000")
var columnArray = MMDB.getSPColumnListNamedParams("EmpDB", ¬
"getNewEmployeesMakingAtLeast", paramNameArray, paramValueArray)
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:
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.