Use %MVR
For example:Class dc.test Extends %Persistent
{
</FONT><FONT COLOR="#000080">Index </FONT><FONT COLOR="#000000">ibar On bar;
</FONT><FONT COLOR="#000080">Property </FONT><FONT COLOR="#000000">bar </FONT><FONT COLOR="#000080">As %String</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#000080">COLLATION </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#800080">"MVR"</FONT><FONT COLOR="#000000">);
</FONT><FONT COLOR="#000080">ClassMethod </FONT><FONT COLOR="#000000">Test()
{
</FONT><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#000000">..</FONT><FONT COLOR="#0000ff">%KillExtent</FONT><FONT COLOR="#000000">()
</FONT><FONT COLOR="#800080">&sql(</FONT><FONT COLOR="#0000ff">insert </FONT><FONT COLOR="#000080">into </FONT><FONT COLOR="#008000">dc</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#008000">test</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">bar</FONT><FONT COLOR="#000000">)
</FONT><FONT COLOR="#0000ff">select </FONT><FONT COLOR="#008080">'00123AB' </FONT><FONT COLOR="#000080">union
</FONT><FONT COLOR="#0000ff">select </FONT><FONT COLOR="#008080">'12345AB'</FONT><FONT COLOR="#800080">)
</FONT><FONT COLOR="#0000ff">d $system</FONT><FONT COLOR="#008080">.SQL</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">TuneTable</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#0000ff">$classname</FONT><FONT COLOR="#000000">(),</FONT><FONT COLOR="#0000ff">$$$YES</FONT><FONT COLOR="#000000">), </FONT><FONT COLOR="#0000ff">$system</FONT><FONT COLOR="#008080">.OBJ</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">Compile</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#0000ff">$classname</FONT><FONT COLOR="#000000">(),</FONT><FONT COLOR="#008000">"cu-d"</FONT><FONT COLOR="#000000">)
</FONT><FONT COLOR="#0000ff">f </FONT><FONT COLOR="#800000">args</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#008000">"00123AB"</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">"123AB" </FONT><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#000080">##class</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008080">%SQL.Statement</FONT><FONT COLOR="#000000">).</FONT><FONT COLOR="#0000ff">%ExecDirect</FONT><FONT COLOR="#000000">(,</FONT><FONT COLOR="#008000">"select * from dc.test where bar=?"</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">args</FONT><FONT COLOR="#000000">).</FONT><FONT COLOR="#0000ff">%Display</FONT><FONT COLOR="#000000">() </FONT><FONT COLOR="#0000ff">w </FONT><FONT COLOR="#000000">!!
}
}</FONT>
Result:USER><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#000080">##class</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008080">dc.test</FONT><FONT COLOR="#000000">).</FONT><FONT COLOR="#0000ff">Test</FONT><FONT COLOR="#000000">()</FONT> ID bar 1 00123AB1 Rows(s) Affected
ID bar 1 00123AB
1 Rows(s) Affected
- Log in to post comments