Microsoft KB Archive/65506

= &quot;Invalid Column&quot; If CREATEINDEX on Field of Nested User TYPE =

Article ID: 65506

Article Last Modified on 11/21/2006



This article was previously published under Q65506



SUMMARY
In Microsoft Basic ISAM, you cannot create an index on a user-defined TYPE, nor can you create an index on a field of a nested user-defined TYPE.

This information applies to Microsoft Basic Professional Development System (PDS) versions 7.00 and 7.10 under MS-DOS and version 7.10 under OS/2.



MORE INFORMATION
Page 333 of the &quot;Microsoft Basic 7.0: Programmer's Guide&quot; and Page 72 of the &quot;Microsoft Basic 7.0: Language Reference&quot; manual for versions 7.00 and 7.10 correctly state that an index cannot be created on an aggregate data type such as a user-defined TYPE. However, they fail to state that you cannot create an index on a field of that nested user-defined TYPE.

For example, in the following TYPE...END TYPE declaration, you can create an index on the field &quot;CustomerName&quot; but not on the user-defined TYPE &quot;CompanyInfo&quot; or on the field of the nested user-defined TYPE &quot;CompanyID&quot;. If you try to create an index on these fields, an &quot;Invalid Column&quot; error is generated on the CREATEINDEX statement. TYPE CompanyRec CompanyID AS INTEGER END TYPE

TYPE CustomerRec CustomerName AS STRING * 20 CompanyInfo AS CompanyRec END TYPE

Additional query words: BasicCom SR# S900822-21

Keywords: KB65506

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.