title: How to represent 64-bit integer in VB6?
body: <p>I am having to augment a legacy app to handle 64-bit integers.  However, VB6 doesn't have a data type for that.  The recommendation online that I've found has been to use the Currency data type.</p>
  
  <p>However, I've found that I am running into some overflow issues.  </p>
  
  <p>Example - Results in Overflow during <code>CCur</code> call:</p>
  
  <pre><code>dim c as currency
  
  ' set maximum value of int64
  c = CCur("9223372036854775807")
  </code></pre>
  
  <p>However, if I apply a smaller number (but still much larger than int32), it does work:</p>
  
  <pre><code>dim c as currency
  
  ' Remove the last 4 digits
  c = CCur("922337203685477")
  </code></pre>
  
  <p>So what am I missing here?  How can I handle a 64-bit value?</p>
  
  <p>The only thing that I need to do with the 64-bit values is to read them from a SQL Server stored procedure (it comes as sql type bigint) and then display it to the form.</p>