FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 25
→
Hsave está editando e não incluindo
Hsave está editando e não incluindo
Débuté par ANDRE MARTINI / IS2, 15 mar. 2016 21:49 - 7 réponses
Connectez-vous…
ANDRE MARTINI / IS2
#1
Membre enregistré
212 messages
Popularité : +25 (25 votes)
Posté le 15 mars 2016 - 21:49
olá pessoal,
tem algo estranho no sistema e não consigo encontrar o problema. tenho um cadastro de contas bancárias com a seguinte estrutura:
codigo_da_conta (unique)
nome_da_conta (unique)
codigo_do_banco (estrangeira - permite duplicar)
quando clico no botão novo, coloco os dados e salvo o sistema salva corretamente o novo registro
exemplo cod: 1, nome: CARTEIRA, banco: DIVERSOS
quando clico no botão novo pelo segunda vez, ao invés de lançar um novo registro código 2, o sistema está alterado o código 1 para código 2
os demais cadastros do sistema funcionam tudo normal, os outros cadastros são simples, não tem chave estrangeira, o que será que fiz de errado?
--
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
Signaler
0
0
ANDRE MARTINI / IS2
#2
Membre enregistré
212 messages
Popularité : +25 (25 votes)
Posté le 15 mars 2016 - 21:54
código botão NOVO
// Create a new record
HReset
(
Contas_bancarias
)
IF
WinStatus
(
WIN_
Contas_Bancarias_Formulario
)
=
NotFound
THEN
OpenChild
(
WIN_
Contas_Bancarias_Formulario
,
AcaoIncluindo
)
ELSE
Restore
(
WIN_
Contas_Bancarias_Formulario
)
END
// Refresh the table
TableDisplay
(
TABLE_
Contas_bancarias
,
taCurrentFirst
)
código botão SALVAR
// Read the information entered
IF
Contas_bancarias
..
NewRecord
=
True
THEN
IF
EDT_
Codigo_da_conta
=
0
THEN
EDT_
Codigo_da_conta
=
Contas_Bancarias_Sequencial_Codigo
(
)
END
END
// Read the information entered
ScreenToFile
(
)
// Add / modify the record
HSave
(
Contas_bancarias
)
// Return value of the window
MyWindow
..
ReturnedValue
=
True
na primeira vez "Contas_bancarias..NewRecord " é igual a true, a partir da segunda "Contas_bancarias..NewRecord " sempre fica FALSE
--
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
Signaler
0
0
adrianoboller
#3
Membre enregistré
3 659 messages
Popularité : +175 (223 votes)
Posté le 15 mars 2016 - 22:24
Prezado Andre,
Faça uma tabela no analisys
Ao final crie uma janela RAD que crie o Browser e o form
Voce vera que funciona perfeitamente.
RE-LEIA O HELP:
http://www.help.windev.com
--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 9949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.blogspot.com.br/
Signaler
0
0
ANDRE MARTINI / IS2
#4
Membre enregistré
212 messages
Popularité : +25 (25 votes)
Posté le 16 mars 2016 - 11:12
Eu sei que funciona, está funcionando em todas os outros cadastros, meu problema é só neste cadastro!
--
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
Signaler
0
0
adrianoboller
#5
Membre enregistré
3 659 messages
Popularité : +175 (223 votes)
Posté le 16 mars 2016 - 12:23
Prezado Andre,
Me adicione no skype adrianoboller
Vou te ajudar.
--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 9949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.blogspot.com.br/
Signaler
0
0
ANDRE MARTINI / IS2
#6
Membre enregistré
212 messages
Popularité : +25 (25 votes)
Posté le 16 mars 2016 - 13:18
você já tem meu skype: andremartini_is2
--
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
Signaler
0
0
ANDRE MARTINI / IS2
#7
Membre enregistré
212 messages
Popularité : +25 (25 votes)
Posté le 16 mars 2016 - 15:12
Resolvido. Foi só comentar a linha TableDisplay...
O sistema abria o formulário pelo openchild e executava o tabledisplay posicionando no primeiro registro.
// Create a new record
HReset
(
Contas_bancarias
)
IF
WinStatus
(
WIN_
Contas_Bancarias_Formulario
)
=
NotFound
THEN
OpenChild
(
WIN_
Contas_Bancarias_Formulario
,
AcaoIncluindo
)
ELSE
Restore
(
WIN_
Contas_Bancarias_Formulario
)
END
// Refresh the table
//TableDisplay(TABLE_Contas_bancarias,taCurrentFirst)
no RAD funcionava porque ele abria pelo OPEN que espera um retorno
// Create a new record
HReset
(
Contas_bancarias
)
// Open the form of Contas_bancarias file in creation mode
IF
Open
(
WIN_
Form_Contas_bancarias
)
THEN
// Refresh the table
TableDisplay
(
TABLE_
Contas_bancarias
,
taCurrentFirst
)
END
eu não preciso do TableDisplay no botão NOVO porque para atualizar o table da janela que chama a opção novo eu uso a função abaixo
Focus gain of
WIN_
Contas_Bancarias
TableDisplay
(
TABLE_
Contas_bancarias
,
taCurrentSelection
)
TA LOUCO! Estas coisas não se governam ainda!
--
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
Message modifié, 16 mars 2016 - 15:16
Signaler
1
0
adrianoboller
#8
Membre enregistré
3 659 messages
Popularité : +175 (223 votes)
Posté le 16 mars 2016 - 19:36
Ótimo
--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 9949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.blogspot.com.br/
Signaler
0
0
→ Revenir à WINDEV 25
WINDEV 25
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte