Skip to content
Daniel de Morais Compartilhe. Aprenda. Evolua.
Infocotidiano Infocotidiano

Meu dia-a-dia tecnológico

Infocotidiano
Infocotidiano

Meu dia-a-dia tecnológico

Criar Tabela Paradox – Delphi

Daniel Morais, 20102019


Exemplo de como criar uma tabela paradox em tempo de execução no delphi com chaves primárias e segundárias:   // Tabela: ‘CADFOR’   with TTable.Create(Application) do
  begin
    try
      TableName := ‘CadFOR’;
      DatabaseName := ‘MeuAlias’;
      TableType := ttParadox;       if not Exists then
      begin
        with FieldDefs do
        begin
          Clear;
          Add(‘CODIGOFOR’, ftAutoInc, 0, False);
          Add(‘RAZAOFOR’, ftString, 60, False);
          Add(‘FANTASIAFOR’, ftString, 40, False);
          Add(‘CGCCPFFOR’, ftString, 20, False);
          Add(‘IERGFOR’, ftString, 20, False);
          Add(‘ENDFOR’, ftString, 50, False);
          Add(‘COMPLFOR’, ftString, 20, False);
          Add(‘CIDFOR’, ftString, 40, False);
          Add(‘CEPFOR’, ftString, 10, False);
          Add(‘UFFOR’, ftString, 2, False);
          Add(‘SITEFOR’, ftString, 40, False);
          Add(‘DDDFOR’, ftString, 3, False);
          Add(‘FONE1FOR’, ftString, 15, False);
          Add(‘FONE2FOR’, ftString, 15, False);
          Add(‘FONE3FOR’, ftString, 15, False);
          Add(‘FONE4FOR’, ftString, 15, False);
          Add(‘CONTATOFOR’, ftString, 30, False);
          Add(‘EMAILFOR’, ftString, 40, False);
          Add(‘OBSFOR’, ftMemo, 1, False);
        end;         with IndexDefs do
        begin
          Clear;
          Add(”, ‘CODIGOFOR’, [ixPrimary, ixUnique]);
          Add(‘CGCC’, ‘CGCCPFFOR’, [ixCaseInsensitive]);
          Add(‘FANT’, ‘FANTASIAFOR’, [ixCaseInsensitive]);
          Add(‘RAZA’, ‘RAZAOFOR’, [ixCaseInsensitive]);
          Add(‘CODI’, ‘CODIGOFOR’, [ixCaseInsensitive]);
        end;         CreateTable;
      end;
    finally
      Free;
    end;
  end;

Programação Todos

Navegação de Post

Previous post
Next post

Deixe um comentário Cancelar resposta

Você precisa fazer o login para publicar um comentário.

Pesquisa

ACBr acbr lazarus ACBRposprinter antivirus antivirus gratuito apagar atualizar AVG AVG FREE banco de dados chave estrangeira consulta create table criar tabela crosscompile cross compile cross compiling dbgrid delphi Dia do ACBr filtro flutter foreign key horse impressora de cupom instalar join lazarus Lazarus Streaming Day linux MariaDB mysql parametros pesquisa incremental pesquisa multipla PostGreSQL primary key Python query RDW rxdbgrid sql server update views where

  • Python para Programador Pascal – Parte #1
  • Monitora – Desenhe e monitore sua rede doméstica ou escritório. Escrito em Lazarus/FPC.
  • Crie seu projeto Lazarus/fpc a partir das tabelas do seu banco de dados.
  • Instalando o Node.js e Gerenciando Dependências no Windows
  • Introdução a Classes em Python, cliente
  • Dica Python: Como separar Listas de Forma Elegante
  • Python #01 – Instalando Python e Studio Code no Linux
  • Entendendo Operadores de Comparação Python
  • Entendendo os Operadores Aritméticos em Python
  •  IntraWeb no Lazarus – Primeiros Passos
  • Utilizando Interpose Class no Lazarus
  • Antivírus Gratuitos DEZ2024
  • Operadores em Python
©2026 Infocotidiano | WordPress Theme by SuperbThemes