OCLOperators sqlpassthrough
No edit summary
No edit summary
Line 3: Line 3:
Notes
Notes
* @aNyttLosenord here is automatically available because it's a variable available when the function is called
* @aNyttLosenord here is automatically available because it's a variable available when the function is called
* You need to quote strings to be passed (if they aren't variables), like ''self.Anvandarnamn'' above. The \' is an escaped quote in OCL
* You need to quote strings to be passed (if they aren't variables), like ''self.Anvandarnamn'' above. The \' is an escaped quote in OCL ([[Escape codes]])


* Int32 at the end is the SQL server return code
* Int32 at the end is the SQL server return code

Revision as of 10:55, 6 July 2018

Example of how the OCL look like to call an stored procedure

Anvandare.sqlpassthrough('sp_Upd_Losen ' + self.AnvId.asString + ', \'' + self.Anvandarnamn + '\', @aNyttLosenord', Int32)

Notes

  • @aNyttLosenord here is automatically available because it's a variable available when the function is called
  • You need to quote strings to be passed (if they aren't variables), like self.Anvandarnamn above. The \' is an escaped quote in OCL (Escape codes)
  • Int32 at the end is the SQL server return code

A use case and examples of using sqlPassThrough can be found here "PSExpression , or how to do things in the DB from MDriven"

Also look here OCLOperators sqlpassthroughobjects

This page was edited 94 days ago on 02/10/2024. What links here