GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEV
,
WEBDEV
e
WINDEV Mobile
Inicio
|
Mensagens recentes
|
Conecte-se...
|
Disconnect
|
Português
Inicio
→
WINDEV 2024
→
Trap errors constraint with MySQL
Trap errors constraint with MySQL
Iniciado por guillermo, jan., 20 2006 8:23 AM - 1 resposta
Conecte-se…
guillermo
#1
Publicado em janeiro, 20 2006 - 8:23 AM
Hi forum...
I generated a project with an analysis, I put all the files via OleDb with a connection MySql.
When the project runs, all files in the Database are created.
After, with the MySQL Administrator, I generated the constraints.
How can I trap the error, eg. attemp to delete a parent record that contains child associated ?
With HF I use HOnError("*",hErrIntegrity,Integrity), but now I'm lost
Guillermo
Denunciar
0
0
Guillermo
#2
Publicado em janeiro, 23 2006 - 10:33 AM
I solved it in the following way
in the GlobalDeclaration of the form
WHEN EXCEPTION
elMensaje is string = ExtractString(ExceptionInfo(errMessage),2,CR)
elMensaje = ExtractString(elMensaje,2,"=")
SWITCH NoSpace(elMensaje)
CASE "170133"
Info("No se puede eliminar el registro porque tiene"," registros asociados en otra tabla"...
,"Verifique")
END
ExceptionEnable()
END
Guillermo
Hi forum...
I generated a project with an analysis, I put all the files via OleDb with a connection MySql.
When the project runs, all files in the Database are created.
After, with the MySQL Administrator, I generated the constraints.
How can I trap the error, eg. attemp to delete a parent record that contains child associated ?
With HF I use HOnError("*",hErrIntegrity,Integrity), but now I'm lost
Guillermo
Denunciar
0
0
→ Voltar para WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (versões anteriores)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Tipo de Pesquisa
Apenas tópicos
Todas as mensagens
Período de pesquisa
Qualquer momento
Última hora
Últimas 24 horas
Semana passada
Mês passado
Ano passado
Cancelar
Pré-visualização da sua mensagem
Adicionar imagem
Importar uma imagem de uma URL
Enviar uma imagem a partir do seu disco
Deixe um ficheiro ou clique em "Procurar ..."
ou
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto