<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    On 3/18/2011 2:29 PM, Tiemo Hollmann TB wrote:
    <blockquote cite="mid:006401cbe568$24710fe0$6d532fa0$@de"
      type="cite">
      <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:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"Times New Roman \, serif \;";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* 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.HTMLVorformatiertZchn
        {mso-style-name:"HTML Vorformatiert Zchn";
        mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert";
        font-family:Consolas;
        color:black;}
span.E-MailFormatvorlage19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.E-MailFormatvorlage20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.E-MailFormatvorlage21
        {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]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"
            lang="EN-US">Hi Ivan,<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><b><span style="font-size: 12pt;
              font-family: &quot;Times New
              Roman&quot;,&quot;serif&quot;; color: rgb(127, 127, 0);"
              lang="EN-US">put</span></b><span style="font-size: 12pt;
            font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"
            lang="EN-US"> VDataBase_CreateForeignKeyLink(gDBRef, </span><span
            style="font-size: 12pt; font-family: &quot;Times New
            Roman&quot;,&quot;serif&quot;; color: rgb(0, 0, 127);"
            lang="EN-US">"link_begriff_rubrik"</span><span
            style="font-size: 12pt; font-family: &quot;Times New
            Roman&quot;,&quot;serif&quot;;" lang="EN-US">,
            begriff.begriff_ID, rubrik.begriff_ID ) </span><span
            style="font-size: 12pt; font-family: &quot;Times New
            Roman&quot;,&quot;serif&quot;; color: rgb(127, 0, 127);"
            lang="EN-US">into</span><span style="font-size: 12pt;
            font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"
            lang="EN-US"> glinkRef</span><span style="font-size: 12pt;
            font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;
            color: windowtext;" lang="EN-US"><o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"
            lang="EN-US"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"
            lang="EN-US">the log says: ERROR: Wrong ref for
            "inKeyFieldRef"<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"
            lang="EN-US"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"
            lang="EN-US">I have created the table and KeyField before,
            like:<o:p></o:p></span></p>
        <p class="MsoNormal"><b><span style="font-size: 12pt;
              font-family: &quot;Times New
              Roman&quot;,&quot;serif&quot;; color: rgb(127, 127, 0);"
              lang="EN-US">put</span></b><span style="font-size: 12pt;
            font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"
            lang="EN-US"> VDatabase_CreateTable(gDBRef, </span><span
            style="font-size: 12pt; font-family: &quot;Times New
            Roman&quot;,&quot;serif&quot;; color: rgb(0, 0, 127);"
            lang="EN-US">"begriff"</span><span style="font-size: 12pt;
            font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"
            lang="EN-US">) </span><span style="font-size: 12pt;
            font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;
            color: rgb(127, 0, 127);" lang="EN-US">into</span><span
            style="font-size: 12pt; font-family: &quot;Times New
            Roman&quot;,&quot;serif&quot;;" lang="EN-US"> tblRef<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><b><span style="font-size: 12pt;
              font-family: &quot;Times New
              Roman&quot;,&quot;serif&quot;; color: rgb(127, 127, 0);"
              lang="EN-US">get</span></b><span style="font-size: 12pt;
            font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"
            lang="EN-US"> VTable_CreateShortField(tblRef, </span><span
            style="font-size: 12pt; font-family: &quot;Times New
            Roman&quot;,&quot;serif&quot;; color: rgb(0, 0, 127);"
            lang="EN-US">"begriff_ID"</span><span style="font-size:
            12pt; font-family: &quot;Times New
            Roman&quot;,&quot;serif&quot;;" lang="EN-US">, </span><span
            style="font-size: 12pt; font-family: &quot;Times New
            Roman&quot;,&quot;serif&quot;; color: rgb(0, 0, 127);"
            lang="EN-US">"fIndexed, fUnique"</span><span
            style="font-size: 12pt; font-family: &quot;Times New
            Roman&quot;,&quot;serif&quot;;" lang="EN-US">)<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 12pt;
            font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"
            lang="EN-US"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal" style=""><span style="color: rgb(31, 73,
            125);" lang="EN-US">Am I missing a primary key? I f yes, how
            to create? There is no field flag for primary key. Obviously
            I am missing again something<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="color: rgb(31, 73,
            125);" lang="EN-US">Btw. Creating the same link in VStudio
            works without anything else<o:p></o:p></span></p>
        <br>
      </div>
    </blockquote>
    <br>
    No 'unique' is enough to be a key.<br>
    I guess you need something like this instead:<br>
    <br>
    <p class="MsoNormal"><b><span style="font-size: 12pt; font-family:
          &quot;Times New Roman&quot;,&quot;serif&quot;; color: rgb(127,
          127, 0);" lang="EN-US">put</span></b><span style="font-size:
        12pt; font-family: &quot;Times New
        Roman&quot;,&quot;serif&quot;;" lang="EN-US">
        VDatabase_CreateTable(gDBRef, </span><span style="font-size:
        12pt; font-family: &quot;Times New
        Roman&quot;,&quot;serif&quot;; color: rgb(0, 0, 127);"
        lang="EN-US">"begriff"</span><span style="font-size: 12pt;
        font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"
        lang="EN-US">) </span><span style="font-size: 12pt;
        font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;
        color: rgb(127, 0, 127);" lang="EN-US">into</span><span
        style="font-size: 12pt; font-family: &quot;Times New
        Roman&quot;,&quot;serif&quot;;" lang="EN-US"> tblRef</span></p>
    <p class="MsoNormal" style=""><b><span style="font-size: 12pt;
          font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;
          color: rgb(127, 127, 0);" lang="EN-US">put</span></b><span
        style="font-size: 12pt; font-family: &quot;Times New
        Roman&quot;,&quot;serif&quot;;" lang="EN-US">
        VTable_CreateShortField(tblRef, </span><span style="font-size:
        12pt; font-family: &quot;Times New
        Roman&quot;,&quot;serif&quot;; color: rgb(0, 0, 127);"
        lang="EN-US">"begriff_ID"</span><span style="font-size: 12pt;
        font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"
        lang="EN-US">, </span><span style="font-size: 12pt;
        font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;
        color: rgb(0, 0, 127);" lang="EN-US">"fIndexed, fUnique"</span><span
        style="font-size: 12pt; font-family: &quot;Times New
        Roman&quot;,&quot;serif&quot;;" lang="EN-US">) into IDref<br>
      </span></p>
    <span style="font-size: 12pt; font-family: &quot;Times New
      Roman&quot;,&quot;serif&quot;;" lang="EN-US"></span>...<br>
    <p class="MsoNormal"><b><span style="font-size: 12pt; font-family:
          &quot;Times New Roman&quot;,&quot;serif&quot;; color: rgb(127,
          127, 0);" lang="EN-US">put</span></b><span style="font-size:
        12pt; font-family: &quot;Times New
        Roman&quot;,&quot;serif&quot;;" lang="EN-US">
        VDatabase_CreateTable(gDBRef, </span><span style="font-size:
        12pt; font-family: &quot;Times New
        Roman&quot;,&quot;serif&quot;; color: rgb(0, 0, 127);"
        lang="EN-US">"</span><span style="font-size: 12pt; font-family:
        &quot;Times New Roman&quot;,&quot;serif&quot;;" lang="EN-US">rubrik</span><span
        style="font-size: 12pt; font-family: &quot;Times New
        Roman&quot;,&quot;serif&quot;; color: rgb(0, 0, 127);"
        lang="EN-US">"</span><span style="font-size: 12pt; font-family:
        &quot;Times New Roman&quot;,&quot;serif&quot;;" lang="EN-US">) </span><span
        style="font-size: 12pt; font-family: &quot;Times New
        Roman&quot;,&quot;serif&quot;; color: rgb(127, 0, 127);"
        lang="EN-US">into</span><span style="font-size: 12pt;
        font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"
        lang="EN-US"> tblRubrikRef</span></p>
    <p class="MsoNormal" style=""><b><span style="font-size: 12pt;
          font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;
          color: rgb(127, 127, 0);" lang="EN-US">put</span></b><span
        style="font-size: 12pt; font-family: &quot;Times New
        Roman&quot;,&quot;serif&quot;;" lang="EN-US">
        VTable_CreateShortField(</span><span style="font-size: 12pt;
        font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"
        lang="EN-US">tblRubrikRef</span><span style="font-size: 12pt;
        font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"
        lang="EN-US">, </span><span style="font-size: 12pt;
        font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;
        color: rgb(0, 0, 127);" lang="EN-US">"begriff_ID"</span><span
        style="font-size: 12pt; font-family: &quot;Times New
        Roman&quot;,&quot;serif&quot;;" lang="EN-US">, </span><span
        style="font-size: 12pt; font-family: &quot;Times New
        Roman&quot;,&quot;serif&quot;; color: rgb(0, 0, 127);"
        lang="EN-US">"fIndexed"</span><span style="font-size: 12pt;
        font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"
        lang="EN-US">) into Ptrref<br>
      </span></p>
    <span style="font-size: 12pt; font-family: &quot;Times New
      Roman&quot;,&quot;serif&quot;;" lang="EN-US">...</span><br>
    <p class="MsoNormal" style=""><b><span style="font-size: 12pt;
          font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;
          color: rgb(127, 127, 0);" lang="EN-US">put</span></b><span
        style="font-size: 12pt; font-family: &quot;Times New
        Roman&quot;,&quot;serif&quot;;" lang="EN-US">
        VDataBase_CreateForeignKeyLink(gDBRef, </span><span
        style="font-size: 12pt; font-family: &quot;Times New
        Roman&quot;,&quot;serif&quot;; color: rgb(0, 0, 127);"
        lang="EN-US">"link_begriff_rubrik"</span><span style="font-size:
        12pt; font-family: &quot;Times New
        Roman&quot;,&quot;serif&quot;;" lang="EN-US">, IDRef, PtrRef ) </span><span
        style="font-size: 12pt; font-family: &quot;Times New
        Roman&quot;,&quot;serif&quot;; color: rgb(127, 0, 127);"
        lang="EN-US">into</span><span style="font-size: 12pt;
        font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"
        lang="EN-US"> glinkRef</span><span style="font-size: 12pt;
        font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;
        color: windowtext;" lang="EN-US"></span></p>
    <span style="color: rgb(31, 73, 125);" lang="EN-US"></span><br>
    &nbsp;<br>
    <pre class="moz-signature" cols="72">-- 
Best regards,
Ivan Smahin 
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
<a class="moz-txt-link-freetext" href="http://www.valentina-db.com">http://www.valentina-db.com</a></pre>
  </body>
</html>