PAGUE 6 MESES
LEVE 12 MESES
GARANTIR DESCONTO

Fórum Erro registro:´registro´ needs finalization - not allowed .. #240471

30/06/2004

0

galera to com problema neste codigo. Da um erro na declaração da varialvel arq dizendo: [Error] Unit1.pas(205): Type ´registro´ needs finalization - not allowed in file type

codigo:

procedure TForm1.btnsalvarClick(Sender: TObject);
type registro=record
        crm:integer;
        nome:string;
        endereco:string;
        bairro:string;
        municipio:string;
        uf:string;
        cep:string;
      end;
var etiqueta:registro;
     arq:file of registro;

begin
AssignFile( arq,´c:\programas\etiqueta\´+ txtsalvar.Text+´.DAT´);
Rewrite(arq);
Reset(arq);
qryconsulta.First;
while not(qryconsulta.eof)do
 begin
     if qryconsulta[´CRM´]<>NULL THEN
       etiqueta.crm:=qryconsulta[´CRM´];
      if qryconsulta[´NOME´]<>null then
       etiqueta.nome:=qryconsulta[´NOME´];
      if qryconsulta[´ENDERECO´]<>null then
       etiqueta.endereco:=qryconsulta[´ENDERECO´];
      if qryconsulta[´BAIRRO´]<>null then
       etiqueta.bairro:=qryconsulta[´BAIRRO´];
      if qryconsulta[´MUNICIPIO´]<>null then
       etiqueta.municipio:=qryconsulta[´MUNICIPIO´];
      if qryconsulta[´UF´]<>null then
       etiqueta.uf:=qryconsulta[´UF´];
      if qryconsulta[´CEP´]<>null then
       etiqueta.cep:=qryconsulta[´CEP´];

      Write(arq,etiqueta);
      qryconsulta.Next;
  end;
CloseFile(arq);
end;



:arrow: [color=red:940a497e6b]Título alterado pelo Moderador oTTo. Removido: ´registro´.[/color:940a497e6b]
[color=blue:940a497e6b]Usado BBCode pra facilitar a leitura.[/color:940a497e6b]

:idea: Leia as regras de conduta do fórum.


Speedrob

Speedrob

Responder

Posts

30/06/2004

Speedrob

alguem sabe o que devo fazer?


Responder

Gostei + 0

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar