Recently a new Database I am working on 16.R2 build 209757 has a problem.
We have a 5 compound Indexes in the structure. We have a dialog that will 
display the tables, fields, and index name for the compound indexes. The 
problem I am having is that the following indicates there are 4 compound 
Indexes:

ON ERR CALL("OnError_QueryBySQL") 
        Begin SQL

                Select count(Column_Position)
                From  _User_Ind_Columns
                Where  Column_Position = 2
                Into :$vL_NumCompositeIndex;
        End SQL
ON ERR CALL("") 


In the method that calls the above I have the following code which indicates 
there are 5 compound Index Names:

Begin SQL                       
        SELECT _USER_INDEXES.INDEX_NAME,  _USER_IND_COLUMNS.COLUMN_NAME
        FROM  _USER_INDEXES, _USER_IND_COLUMNS
        WHERE _USER_INDEXES.INDEX_ID = _USER_IND_COLUMNS.INDEX_ID AND
                        _USER_INDEXES.TABLE_NAME = :$vT_TableName AND 
_USER_INDEXES.INDEX_TYPE =1
        INTO :$aT_IndexName, :$aT_IndexFieldName;
End SQL

I expect this will cause a problem if that corrupt compound index is attempted 
to be used.

When I execute the following line of code which has in it a string of a new 
table that I want to create it will generate a 4D Engine Error #-1 - Invalid 
table number requested by a Plug-in at Line 48. This method has worked well up 
until the error of the count of compound indexes and Compound index names 
became different.


EXECUTE IMMEDIATE :$vT_CreateTable_SQL;

 

I have run the MSC and it tells me everything is fine. Has anyone seen this 
kind of problem and / or have ideas on resolving it?

Thanks for any hints in the right direction.

Jody
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to