KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q65506: "Invalid Column" If CREATEINDEX on Field of Nested User TYPE

Article: Q65506
Product(s): See article
Version(s): 7.00 7.10 | 7.10
Operating System(s): MS-DOS | OS/2
Keyword(s): ENDUSER | SR# S900822-21 docerr | mspl13_basic
Last Modified: 21-SEP-1990

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.

Page 333 of the "Microsoft BASIC 7.0: Programmer's Guide" and Page 72
of the "Microsoft BASIC 7.0: Language Reference" 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 "CustomerName" but not on the
user-defined TYPE "CompanyInfo" or on the field of the nested
user-defined TYPE "CompanyID". If you try to create an index on these
fields, an "Invalid Column" 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

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.