tTable.createTable does not work ???

Can someone help.

I want to create temporary DBase tables with DBase expression indexes.

My problem arises when:

        - I create a first physical table with an index
        - I use this index (indexname = ... )
        - I use this table to do some work
        .... Later
        - Cannot create a second physical table.

If I do not use the index , than I can create as many
tables as I want.

The following works fine

    with MyTable do
    begin
        tablename := RandomName()
        CreateTable ;
        AddIndex('index name', 'my expression' , [ixExpressionion] );
        open;
        close;
        tablename := RandomName()
        CreateTable ;
        AddIndex(' index name', ' my expression', [ixExpressionion] );
    end;

The following does not work

    with MyTable do
    begin
        tablename := RandomName()
        CreateTable ;
        AddIndex('Indexname', 'my expression', [ixExpressionion] );
        open;
        indexname := 'Indexname'  ;     // line added causing problem  
        indexname := ''  ;                        // line added
        close;
        tablename := RandomName()
        CreateTable ;                   // Fails here
    end;

The message I get is the following: (I translated a french message)

        Index descriptor incorrect
        Table does not exist
        Table : ( the name of the table I try to create )

Can someone help?

Luc Harnois.

        MyTable.add