PC SOFT

GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEVWEBDEV e WINDEV Mobile

Inicio → WINDEV 25 → Integridade Pai-Filho - Não Exclui Filhos
Integridade Pai-Filho - Não Exclui Filhos
Iniciado por Mister ANDRE MARTINI, jul., 28 2016 9:49 PM - 3 respostas
Membro registado
210 mensagems
Popularité : +25 (25 votes)
Publicado em julho, 28 2016 - 9:49 PM
Olá,

tenho duas tabelas: Xml_nfe_entrada (tabela pai) e Xml_nfe_entrada_produtos (tabela filho), a chave única da tabela Xml_nfe_entrada é uma chave composta (codigo empresa + sequencial), tenho a mesma chave na tabela filho só que não é única.

veja a configuração da integridade entre as tabelas (1-N)





veja a configuração da integridade entre as tabelas - regra para deletar
Delete the "Xml_nfe_entrada" and all his "Xml_nfe_entrada_produtos"
Delete o "Xml_nfe_entrada" e todos os seus "Xml_nfe_entrada_produtos"




veja os dados da tabela pai, tem somente o sequencial 1 e 2




veja os dados da tabela filho, tem o sequencial 3 que não existe na tabela pai




O que pode estar errado?

Obrigado!

--
André Martini
IS2 Automotive http://www.is2.inf.br/is2automotive/index.html
IS2 Construtive http://www.is2.inf.br/is2construtive/index.html
IS2 Store http://www.is2.inf.br/is2store/index.html
IS2 Gerent http://www.is2.inf.br/is2gerent/index.html
Membro registado
210 mensagems
Popularité : +25 (25 votes)
Membro registado
210 mensagems
Popularité : +25 (25 votes)
Publicado em agosto, 22 2016 - 9:52 PM
Agora resolveu funcionar!

--
André Martini
IS2 Automotive http://www.is2.inf.br/is2automotive/index.html
IS2 Construtive http://www.is2.inf.br/is2construtive/index.html
IS2 Store http://www.is2.inf.br/is2store/index.html
IS2 Gerent http://www.is2.inf.br/is2gerent/index.html
Mensagem modificada, agosto, 22 2016 - 9:52 PM
Membro registado
3.659 mensagems
Popularité : +175 (223 votes)
Publicado em agosto, 26 2016 - 1:16 AM
:thank you:

--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 9949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/