Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
View Problem in 2º update
Message
From
12/06/2000 18:42:05
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
View Problem in 2º update
Miscellaneous
Thread ID:
00379551
Message ID:
00379551
Views:
54
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
Map
View

Click here to load this message in the networking platform