I have read the "help" on ".change_begin()" and ".change_end()".
From what I understand the following should work ............
dim tblOrgContRel as p
tblOrgContRel = table.open("Orgcontactrelationships.dbf")
'
tblOrgContRel.fetch_first()
while .NOT. tblOrgContRel.fetch_eof()
'
... various code to send up the various holding variables
'
tblOrgContRel.change_begin()
tblOrgContRel.Address1 = OrgContV_Address1
tblOrgContRel.Address2 = OrgContV_Address2
tblOrgContRel.City = OrgContV_City
tblOrgContRel.County = OrgContV_County
tblOrgContRel.Province = OrgContV_Province
tblOrgContRel.Country = OrgContV_Country
tblOrgContRel.Postalcode = OrgContV_Postalcode
tblOrgContRel.Phone = OrgContV_Phone
tblOrgContRel.change_end(.T.)
'
trace.writeln("OrgAddress1="+OrgAddress1)
trace.writeln(" OrgContV_Address1="+OrgContV_Address1)
trace.writeln(" tbl.OrgContRelAddress1="+tblOrgContRel.Address1)
trace.writeln(" OrgContRelID="+OrgContRelID)
trace.writeln("..........................")
'
tblOrgContRel.fetch_next()
end while
.................. however
the "trace" shows that the variables have all been updated properly, however the fields in the dbf file has not been updated.
Does anyone have an idea why or is there some other settings that must be in place to do the update???
From what I understand the following should work ............
dim tblOrgContRel as p
tblOrgContRel = table.open("Orgcontactrelationships.dbf")
'
tblOrgContRel.fetch_first()
while .NOT. tblOrgContRel.fetch_eof()
'
... various code to send up the various holding variables
'
tblOrgContRel.change_begin()
tblOrgContRel.Address1 = OrgContV_Address1
tblOrgContRel.Address2 = OrgContV_Address2
tblOrgContRel.City = OrgContV_City
tblOrgContRel.County = OrgContV_County
tblOrgContRel.Province = OrgContV_Province
tblOrgContRel.Country = OrgContV_Country
tblOrgContRel.Postalcode = OrgContV_Postalcode
tblOrgContRel.Phone = OrgContV_Phone
tblOrgContRel.change_end(.T.)
'
trace.writeln("OrgAddress1="+OrgAddress1)
trace.writeln(" OrgContV_Address1="+OrgContV_Address1)
trace.writeln(" tbl.OrgContRelAddress1="+tblOrgContRel.Address1)
trace.writeln(" OrgContRelID="+OrgContRelID)
trace.writeln("..........................")
'
tblOrgContRel.fetch_next()
end while
.................. however
the "trace" shows that the variables have all been updated properly, however the fields in the dbf file has not been updated.
Does anyone have an idea why or is there some other settings that must be in place to do the update???
Comment