2.2.3.13.15 rdsFieldShapeArray

The rdsFieldShapeArray specifies the order and key features of the columns of the RecordSet encapsulated in an rdsCreateRecordsetResponse message.

The syntax of rdsFieldShapeArray is as follows.

 rdsFieldShapeArray = VT-ARRAY-VARIANT
                      ZEROBYTE  
                      rdsFieldShapeArrayNumDims
                      rdsFieldShapeArrayFeatures 
                      rdsFieldShapeArrayElemSize
                      rdsFieldShapeArrayCount
                      rdsFieldShapeArrayLowerBound
                      *rdsFieldShape ;number of elements is value 
                                     ;of rdsFieldShapeArrayCount
  • rdsFieldShapeArrayNumDims: Number of dimensions in this array. This MUST always be set to 1.

     rdsFieldShapeArrayNumDims = %x01.00
    
  • rdsFieldShapeArrayFeatures: Array features for all VARIANT arrays MUST be ARRAYFEATURES-VARIANT.

     rdsFieldShapeArrayFeatures = ARRAYFEATURES-VARIANT 
    
  • rdsFieldShapeArrayElemSize: The size of each element. This value MUST be fixed at 16 for all variants.

     rdsFieldShapeArrayElemSize = SIZEOFELEMVARIANT
      
    
  • rdsFieldShapeArrayCount: Number of elements in this array. This is the number of columns in the RecordSet to be returned by CreateRecordset.

     rdsFieldShapeArrayCount = ULONG
      
    
  • rdsFieldShapeArrayLowerBound: The lower bound of the array. MUST be 0 value.

     rdsFieldShapeArrayLowerBound = %x00.00.00.00
      
    
  • rdsFieldShape: Specifies the attributes of a single column of the result RecordSet. This is encoded as an array of VARIANTs.

     rdsFieldShape = VT-ARRAY-VARIANT
                     ZEROBYTE
                     rdsFieldShapeNumDims
                     rdsFieldShapeFeatures
                     rdsFieldShapeElemSize
                     rdsFieldShapeSize
                     rdsFieldShapeLowerBound
                     rdsFieldShapeSafeArrayData
      
    
  • rdsFieldShapeNumDims: Number of dimensions in this array. This MUST always be set to 1.

     rdsFieldShapeNumDims = %x01.00 
    
  • rdsFieldShapeFeatures: Array features for all VARIANT arrays MUST be ARRAYFEATURES-VARIANT.

     rdsFieldShapeFeatures = ARRAYFEATURES-VARIANT 
    
  • rdsFieldShapeElemSize: The size of each element. This value is fixed at 16 for all variants.

     rdsFieldShapeElemSize = SIZEOFELEMVARIANT 
    
  • rdsFieldShapeSize: Number of elements in this array. MUST be 4 for an rdsFieldShape.

     rdsFieldShapeSize = %x04.00.00.00 
    
  • rdsFieldShapeLowerBound: The lower bound of the array. MUST be 0.

     rdsFieldShapeLowerBound = %x00.00.00.00 
    
  • rdsFieldShapeSafeArrayData: Specifies four attributes of the RecordSet column: the name, datatype identifier, column size, and a "nullable" flag.

     rdsFieldShapeSafeArrayData = rdsFieldNameVariant
                                  rdsFieldDBTYPEVariant
                                  rdsFieldColumnSizeVariant
                                  rdsFieldNullableVariant 
    
  • rdsFieldNameVariant: Specifies the name (rdsFieldName) of the column.

     rdsFieldNameVariant = VT-BSTR rdsFieldName
     rdsFieldName        = BSTRNULLABLE 
    
  • rdsFieldDBTypeVariant: Specifies the datatype identifier (VTDataType) of the column.

     rdsFieldDBTYPEVariant = (VT-I2 VTDataType) /
                             (VT-I4 VTDataType %x00.00) 
    
  • rdsFieldColumnSizevariant: Specifies the size (rdsFieldColumnSizeUSHORT or rdsFieldColumnSizeULONG) of the column.

     rdsFieldColumnSizeVariant = (VT-I2 rdsFieldColumnSizeUSHORT) /
                                 (VT-I4 rdsFieldColumnSizeULONG)
      
     rdsFieldColumnSizeUSHORT  = USHORT
     rdsFieldColumnSizeULONG   = ULONG 
    
  • rdsFieldNullableVariant: Specifies whether the column is nullable (rdsFieldNullable).

     rdsFieldNullableVariant = VT-BOOL rdsFieldNullable
     rdsFieldNullable        = BOOLVAL