Cfprocparam null value




















ColdFusion supports positional parameters. If you use positional parameters, you must code cfprocparam tags in the same order as the associated parameters in the stored procedure definition.

Output variables are stored in the ColdFusion variable specified by the variable attribute. You cannot use the cfprocparam tag for Oracle 8 and 9 reference cursors. Instead, use the cfprocresult tag. The following examples list the equivalent Oracle and Microsoft SQL Server stored procedures that insert data into the database.

The CFML to invoke either stored procedure is the same. The following example shows the Oracle stored procedure:. Legal Notices Online Privacy Policy.

This tag is unsupported in CFFiddle. See also. See the docs. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Ask Question. Asked 11 years, 5 months ago. Active 11 years, 5 months ago. Viewed 4k times. CFML Reference.

All rights reserved. ColdFusion variable name; references the value that the output parameter has after the stored procedure is called. Parameter name that corresponds to the name of the parameter in the stored procedure.

Value that corresponds to the value that ColdFusion passes to the stored procedure. So if userId is zero I want to pass in null to the stored procedure.

Likewise, I want to pass a null if the searchName string is empty. To do this I simply reverse the boolean evaluation of the userId integer. For the search string its only a little more complex. First I get the string length and again reverse the boolean sign of the result. Both these operations can be performed inline in the cfprocparam thus removing the need for a cfif.



0コメント

  • 1000 / 1000