4D v16.3

REGENERATE MISSING TABLE

Página Inicial

 
4D v16.3
REGENERATE MISSING TABLE

REGENERATE MISSING TABLE 


 

REGENERATE MISSING TABLE ( nomeTabela ) 
Parâmetro Tipo   Descrição
nomeTabela  Texto in Nome de tabela não encontrada a regenerar

O comando REGENERATE MISSING TABLE reconstrui a tabela não encontrada cujo nome é passado no parâmetro nomTabela. Quando se reconstrui uma tabela não encontrada, ela se torna visível no editor de estrutura e seus dados são acessíveis novamente.

As tabelas não encontradas são tabelas cujos dados estão presentes no arquivo de dados mas que não existem a nível da estrutura. Pode identificar as tabelas não encontradas que possam estar presentes, utilizando o comando GET MISSING TABLE NAMES.

Se a tabela designada pelo parâmetro nomTabela não for uma tabela faltante do banco, o comando não faz nada.

Exemplo  

Este método regenera todas as tabelas não encontradas eventualmente presentes no banco:

 ARRAY TEXT($arrMissingTables;0)
 GET MISSING TABLE NAMES($arrMissingTables)
 $SizeArray:=Size of array($arrMissingTables)
 If($SizeArray#0)
  //Preenche o array com os nomes de todas as tabelas no banco de dados.
    ARRAY TEXT(arrTables;Get last table number)
    If(Get last table number>0) //Se houver tabelas
       For($vlTables;Size of array(arrTables);1;-1)
          If(Is table number valid($vlTables))
             arrTables{$vlTables}:=Table name($vlTables)
          Else
             DELETE FROM ARRAY(arrTables;$vlTables)
          End if
       End for
    End if
    For($i;1;$SizeArray)
       If(Find in array(arrTables;$arrMissingTables{$i})=-1)
          CONFIRM("Regenerar a tabela"+$arrMissingTables{$i}+"?")
          If(OK=1)
             REGENERATE MISSING TABLE($arrMissingTables{$i})
          End if
       Else
          ALERT("Impossível regenerar a tabela "+$arrMissingTables{$i}+" porque já existe uma tabela com esse nome no banco de dados.")
       End if
    End for
 Else
    ALERT("Não há tabelas a regenerar.")
 End if



Ver também 

GET MISSING TABLE NAMES

 
PROPRIEDADES 

Produto: 4D
Tema: Acesso a Estrutura
Número 1126

 
HISTÓRIA 

Criado por: 4D v12

 
PALAVRAS CHAVES 

missing tables

 
ARTICLE USAGE

Manual de linguagem 4D ( 4D v16)
Manual de linguagem 4D ( 4D v16.1)
Manual de linguagem 4D ( 4D v16.2)
Manual de linguagem 4D ( 4D v16.3)