title: Comparing two values of different types
body: <p>I have an if statement with two data types that I am comparing with each other. <code>rowCount3</code> is a <code>SQLINTEGER</code> and <code>chval1[128]</code> is a <code>SQLCHAR</code>. I've tried several different typecasts; none succeeded.  </p>
  
  <p>I've tried:</p>
  
  <pre><code>if((SQLCHAR)rowcount3 &gt;= (SQLCHAR)chval1)
  </code></pre>
  
  <p>This only works sometimes. When I do a <code>printf()</code> to check the return values they both print out numbers.</p>
  
  <pre><code>printf("Total of Downloads: %d\n",rowCount3);
  printf("Quota of IP Address: %s\n", chval1);
  </code></pre>
  
  <p>The closest I've gotten is the closest (working ~60% of the time): </p>
  
  <pre><code>if (rowCount3 &gt;= chval1)
  </code></pre>
  
  <p>Somebody suggested <code>strcmp()</code>, but I have no experience with that so I am lost in the woods! Any help is appreciated. Thank you. </p>