PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV 25
→
WX - Controlando as mensagens de erro do HDelete e dando a eles uma nava interface de tela ara o usuário final
WX - Controlando as mensagens de erro do HDelete e dando a eles uma nava interface de tela ara o usuário final
Started by BOLLER, Dec., 11 2018 3:35 PM - 1 reply
Connect yourself…
BOLLER
#1
Registered member
3,657 messages
Popularité : +175 (223 votes)
Posted on December, 11 2018 - 3:35 PM
EXEMPLO: Como controlar as mensagens de erros do HDelete e dando a eles uma nava interface de tela ara o usuário final
// in global
HOnError
(
"*"
,
hErrAll
,
GerenciarMsgErros
)
WHEN EXCEPTION IN
HDelete
(
Tabela
,
hRecNumCurrent
,
hCheckIntegrity
)
DO
ProcedureControlErrors
(
)
END
Procedure
GerenciarMsgErros
(
)
SWITCH
HError
(
hErrCurrent
)
CASE
70100
// Lock Error
/ COLOCAR OUTROS CODIGOS DOS OUTROS BANCOS
Error
(
"Registro bloqueado por outro usuario"
,
"aguarde desbloqueio"
)
RESULT
opEndProcess
CASE
70015
// Integrity Error
COLOCAR OUTROS CODIGOS DOS OUTROS BANCOS
Error
(
"Erro de integridade: "
+
HErrorInfo
(
hErrFile
)
+
"."
+
HErrorInfo
(
hErrItem
)
)
Open
(
WIN_Integridade
)
RESULT
opEndProcess
CASE
70010
// Duplicate Error
/ COLOCAR OUTROS CODIGOS DOS OUTROS BANCOS
Error
(
"Duplicidade: "
+
HErrorInfo
(
hErrFile
)
+
"."
+
HErrorInfo
(
hErrItem
)
,
...
"Valor do item: "
+
{
HErrorInfo
(
hErrFile
)
+
"."
+
HErrorInfo
(
hErrItem
)
,
indItem
}
)
Open
(
WIN_Duplicidade
)
RESULT
opEndProcess
CASE
70022
// Password Error / COLOCAR OUTROS CODIGOS DOS OUTROS BANCOS
Error
(
"Erro senha do BD: "
+
HErrorInfo
(
hErrFile
)
)
RESULT
opEndProcess
CASE
70700
// Modification Conflict / COLOCAR OUTROS CODIGOS DOS OUTROS BANCOS
Error
(
"Existe atualização recente neste registro, registro não poderá ser atualizado "
+
H.FileName
)
RESULT
opEndProcess
CASE
70710
// Mandatory Value / COLOCAR OUTROS CODIGOS DOS OUTROS BANCOS
Error
(
"Campo não preenchido: "
+
HErrorInfo
(
)
)
RESULT
opEndProcess
CASE
70720
// Maintenance Error / COLOCAR OUTROS CODIGOS DOS OUTROS BANCOS
Error
(
"Manutenção do BD em progresso"
,
"tente depois!"
)
RESULT
opEndProcess
OTHER
CASE
Error
(
"Erro durante o procedimento: "
+
HErrorInfo
(
)
)
RESULT
opEndProcess
END
--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 99949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/
Report
0
0
BOLLER
#2
Registered member
3,657 messages
Popularité : +175 (223 votes)
Posted on December, 11 2018 - 4:18 PM
IF
HDelete
(
Tabela
,
hRecNumCurrent
,
hCheckIntegrity
) =
True
Info
(
"Excluiu com sucesso"
)
ELSE
GerenciarMsgErros
(
)
END
//ajuste é a mesma procedure
ProcedureControlErrors() = GerenciarMsgErros()
--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 99949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/
Message modified, December, 11 2018 - 4:19 PM
Report
0
0
→ Go back to WINDEV 25
WINDEV 25
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text