General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
View Problem in 2º update
Hi all,
I have a simple form, with a grid based in a view that i can edit, in the first time everything works ok, but if a call the same client in the second time, when i do tableupate() it save's another group of records when what i want is the replace of the records that exist and the append from the new ones,
There is the code from my textbox lost focus,
CodCli=thisform.text1.value
if val(CodCli)<> 0
select distinct *;
from jbfic!familias A ;
left outer join jbfic!familiascli B ;
on b.c_codcli = CodCli ;
and a.c_codigo = b.c_codigo ;
order by a.c_codigo ;
into cursor CUR1
go top
select CLI_FAMILIAS
append from dbf('cur1')
go top
thisform.grid1.refresh()
ThisForm.Grid1.Column3.Text1.setfocus
endif
There is the code in my save bottom
x=TableUpdate(1,.T.,'cli_familias') && Actualiza View
If x=.t.
=messagebox('View OK')
else
aerror(joao)
messagebox(joao[2])
=messagebox('View Fail')
=tablerevert()
endif
CodCli='00000'
requery('cli_familias')
thisform.grid1.refresh()
thisform.text1.value=""
thisform.text1.value=''
thisform.text1.enabled=.t.
thisform.text1.setfocus
Thank's in Advance
João Batista
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only