Sistema de Perguntas
bom pessoal é o seguinte, eu estou desenvolvendo um sistema de cadastro de perguntas feito com paradox. nesse sistema eu tenho uma tabela chamada Perguntas.db e uma tabela chamada GrupoPerg.db, na tabela Perguntas.db eu gravo 12 perguntas e na tabela GrupoPerg.db eu gravo 6 grupos ou seja fica 2 perguntas para cada grupo e numa outra tela eu exibo essas 12 perguntas separadas por grupo,eu to exibindo elas em 12 Labels, eu estou usando um while mas nao esta exibindo todas...se alguem puder me dar uma ajuda vai me adiantar um lado...
abraço pra todos!
ps segue o codigo utilizado.
abraço pra todos!
ps segue o codigo utilizado.
While not Table1.Eof do begin if Table1Grupo.Value=´Comunicação´ then begin Label1.Caption:=Table1.FieldByName(´pergunta´).AsString; end; Table1.next; if Table1Grupo.Value=´Comunicação´ then begin Label2.Caption:=Table1.FieldByName(´pergunta´).AsString; end; Table1.Next; if Table1Grupo.Value=´Qualidade´ then begin Label3.Caption:=Table1.FieldByName(´pergunta´).AsString; end; Table1.next; if Table1Grupo.Value=´Qualidade´ then begin Label4.Caption:=Table1.FieldByName(´pergunta´).AsString; end; Table1.Next; if Table1Grupo.vALUE=´Pontualidade´ then begin Label5.Caption:=Table1.FieldByName(´pergunta´).AsString; end; Table1.Next; if Table1Grupo.Value=´Pontualidade´ then begin Label6.Caption:=Table1.FieldByName(´pergunta´).AsString; end; Table1.next; if Table1Grupo.Value=´Atendimento´ then begin Label7.Caption:=Table1.FieldByName(´pergunta´).AsString; end; Table1.Next; IF Table1Grupo.Value=´Atendimento´ then begin Label8.Caption:=Table1.FieldByName(´pergunta´).AsString; end; Table1.Next; if Table1Grupo.Value=´Preço´then begin Label9.Caption:=Table1.FieldByName(´pergunta´).AsString; end; Table1.Next; if Table1Grupo.Value=´Preço´ then begin Label10.Caption:=Table1.FieldByName(´pergunta´).AsString; end; Table1.Next; if Table1Grupo.value=´Geral´ then begin Label11.Caption:=Table1.FieldByName(´pergunta´).AsString; end; Table1.Next; if Table1Grupo.Value=´Geral´ then begin Label12.Caption:=Table1.FieldByName(´pergunta´).AsString; Table1.Next; end; end;
L3gion4rio
Curtidas 0
Respostas
Rjun
20/07/2005
Provavelmente o erro esta nesse monte de Table.Next. Coloque essa linha somente no fim do loop.
While not Table1.Eof do begin if Table1Grupo.Value = ´Comunicação´ then Label1.Caption := Table1.FieldByName(´pergunta´).AsString else if Table1Grupo.Value = ´Comunicação´ then Label2.Caption := Table1.FieldByName(´pergunta´).AsString else if Table1Grupo.Value = ´Qualidade´ then Label3.Caption := Table1.FieldByName(´pergunta´).AsString; else if Table1Grupo.Value = ´Qualidade´ then Label4.Caption := Table1.FieldByName(´pergunta´).AsString; else if Table1Grupo.Value = ´Pontualidade´ then Label5.Caption := Table1.FieldByName(´pergunta´).AsString; else if Table1Grupo.Value = ´Pontualidade´ then Label6.Caption := Table1.FieldByName(´pergunta´).AsString; else if Table1Grupo.Value = ´Atendimento´ then Label7.Caption := Table1.FieldByName(´pergunta´).AsString; else if Table1Grupo.Value = ´Atendimento´ then Label8.Caption := Table1.FieldByName(´pergunta´).AsString; else if Table1Grupo.Value = ´Preço´then Label9.Caption := Table1.FieldByName(´pergunta´).AsString; else if Table1Grupo.Value = ´Preço´ then Label10.Caption := Table1.FieldByName(´pergunta´).AsString; else if Table1Grupo.value = ´Geral´ then Label11.Caption := Table1.FieldByName(´pergunta´).AsString; else if Table1Grupo.Value = ´Geral´ then Label12.Caption := Table1.FieldByName(´pergunta´).AsString; Table1.Next; end;
GOSTEI 0
L3gion4rio
20/07/2005
Ai cara valeu pela dica...adiantou bastante pra mim..valeu mesmo. abraço pra ti cara!
GOSTEI 0