Use this handy tip to determine the size of your SQL Server tables, which can be very useful for estimating the size and growth of a database over time.
C++'s SAFEARRAY is difficult to use. A better option is to enumerate an array's elements by repeatedly calling your own custom enumeration function and incrementing the element index.