<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.E-MailFormatvorlage17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.HTMLVorformatiertZchn
        {mso-style-name:"HTML Vorformatiert Zchn";
        mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert";
        font-family:Consolas;
        color:black;}
span.E-MailFormatvorlage20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=DE link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Hi Ivan,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Thank you for helping. That was easy: </span><span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";color:#00007F'>"fIndexed, fUnique"</span><span lang=EN-US style='color:#1F497D'> did it. I didn’t knew that the wiki is a generic description, which has to be adapted. Perhaps you could add such a hint, how to adapt the generic description to the specific languages.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Perhaps you also have such an easy solution, why my CreateForeignKeyLink doesn’t works as expected. When using:<o:p></o:p></span></p><p class=MsoNormal><b><span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";color:#7F7F00'>put</span></b><span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif"'> VDataBase_CreateForeignKeyLink(gDBRef, </span><span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";color:#00007F'>"link_begriff_rubrik"</span><span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif"'>, begriff.begriff_ID, rubrik.begriff_ID) </span><span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";color:#7F007F'>into</span><span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif"'> glinkRef</span><span lang=EN-US style='color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>nothing is created (at least when checking in VStudio, there is no link). My variable glinkRef still is empty but the </span><span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif"'>VDataBase_ErrString( gDBRef ) </span><span lang=EN-US style='color:#1F497D'>also is empty</span><span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif"'>.</span><span lang=EN-US style='color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Same with quotes around the key- and ptr field and same with additionally using: </span><span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";color:#00007F'>"kSetNull"</span><span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif"'>, </span><span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";color:#00007F'>"kCascade"</span><span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif"'>, </span><span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";color:#7F007F'>false</span><span lang=EN-US style='color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>The function just runs thru, without creating, without error.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Probably again not able to interpret your wiki?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Thanks<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Tiemo<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>Von:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'> valentina-bounces@lists.macserve.net [mailto:valentina-bounces@lists.macserve.net] <b>Im Auftrag von </b>Ivan Smahin<br><b>Gesendet:</b> Freitag, 18. März 2011 09:04<br><b>An:</b> valentina@lists.macserve.net<br><b>Betreff:</b> Re: How to add multiple flags with createField?<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>On 3/18/2011 9:59 AM, Ivan Smahin wrote: <o:p></o:p></p><p class=MsoNormal>On 3/17/2011 7:32 PM, Tiemo Hollmann TB wrote: <o:p></o:p></p><p class=MsoNormal>Hello,<o:p></o:p></p><p class=MsoNormal><span lang=EN-US>creating tables with the Valentina APIs from liveCode everything works fine with using only one flag, like:</span><o:p></o:p></p><p class=MsoNormal><b><span lang=EN-US style='font-size:12.0pt'>get</span></b><span lang=EN-US style='font-size:12.0pt'> VTable_CreateShortField(tblRef, "myFieldName", fIndexed)</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>Now I want to add the first time multiple flags to a field, but it fails with any syntax shown in the wiki:</span><o:p></o:p></p><p class=MsoNormal><b><span lang=EN-US style='font-size:12.0pt'>get</span></b><span lang=EN-US style='font-size:12.0pt'> VTable_CreateShortField(tblRef, "myFieldName", EVFlags.fIndexed + EVFlags.fUnique)</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:12.0pt'>with this syntax I get from LiveCode the error: “+: error in left operand”</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:12.0pt'>same with</span><o:p></o:p></p><p class=MsoNormal><b><span lang=EN-US style='font-size:12.0pt'>get</span></b><span lang=EN-US style='font-size:12.0pt'> VTable_CreateShortField(tblRef, "myFieldName", fIndexed + fUnique)</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>also not without the “+” or with quotes.</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>Probably I don’t understand the wiki?</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'>The wiki describes a general approach common for all ADKs. <br>V4REV's specific is - everything is passed as a strings. In particular you should pass the set of flags as a tokenized string.<br><br></span><b><span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif"'>get</span></b><span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif"'> VTable_CreateShortField(tblRef, "myFieldName", "fIndexed, fUnique" )</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'>Possible token delimiters are : " ,\t\n+;"<br><br>So it could be<br></span><b><span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif"'>get</span></b><span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif"'> VTable_CreateShortField(tblRef, "myFieldName", "fIndexed fUnique" )<br><b>get</b> VTable_CreateShortField(tblRef, "myFieldName", "fIndexed,fUnique" )<br><b>get</b> VTable_CreateShortField(tblRef, "myFieldName", "fIndexed\tfUnique" )<br><b>get</b> VTable_CreateShortField(tblRef, "myFieldName", "fIndexed\nfUnique" )</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><br></span><b><span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif"'>get</span></b><span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif"'> VTable_CreateShortField(tblRef, "myFieldName", "fIndexed+fUnique" )</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><br><br><o:p></o:p></span></p><pre>-- <o:p></o:p></pre><pre>Best regards,<o:p></o:p></pre><pre>Ivan Smahin <o:p></o:p></pre><pre>Senior Software Engineer<o:p></o:p></pre><pre>Paradigma Software, Inc<o:p></o:p></pre><pre>Valentina - The Ultra-Fast Database<o:p></o:p></pre><pre><a href="http://www.valentina-db.com">http://www.valentina-db.com</a><o:p></o:p></pre></div></div></body></html>