...
Example
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<cfsetvar mumps = createObject("component", "lib.cfmumps.mumps") new lib.cfmumps.Mumps(); mumps.open(); if(mumps.lock("patients", ["WILLIS", "JOHN", "DOB"])) { mumps.set("patients", ["WILLIS", "JOHN", "DOB"], "12/1/1980"); mumps.unlock("patients", ["WILLIS", "JOHN", "DOB"]); } else { writeOutput("<p>Lock failed.</p>"); } mumps.close(); |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<cfset mumps = new lib.cfmumps.Mumps()> <cfset mumps.open()> <!--- lock ^patients("WILLIS, JOHN","DOB") ---> <cfif mumps.lock("patients", ["WILLIS, JOHN", "DOB"])> <cfset mumps.set("patients", ["WILLIS, JOHN", "DOB"], "12/1/1980")> <cfset mumps.unlock("patients", ["WILLIS, JOHN", "DOB"])> <cfelse> <p>Lock failed.</p> </cfif> <cfset mumps.close()> |