>Would it be possible to see your code? I have from 25 to 250 users on VFP applications I have created and we do not have these problems.
Yes, thanks for your help, I have a milion headaches every day from that behaviour.
the code are in methods of baseform class on wich are based all forms
the tables are optimistic table buffer
proc new - adds a new record to parent and child
< pre>
local ldatamaster,ldataslave,llink,lmasterlink
ldatamaster=thisform.datamaster
ldataslave=thisform.dataslave
llink=thisform.datalink
lmasterlink=thisform.datamaster+'.'+thisform.datalink
if dpageform::new()
if cursorgetprop('SourceType',ldataslave)=3
if this.autoitem
insert into (ldataslave) (&llink) values (&lmasterlink)
endif
thisform.refreshform()
else
=requery(ldataslave)
endif
endif
< /pre>
proc newgrid - adds a record to child
< pre>
local ldatamaster,ldataslave,llink,lmasterlink
ldatamaster=thisform.datamaster
ldataslave=thisform.dataslave
llink=thisform.datalink
lmasterlink=thisform.datamaster+'.'+thisform.datalink
sele (ldataslave)
delete for empty(&llink)
append blank
replace &llink with &lmasterlink
thisform.refreshform()
thisform.pageframe1.page1.gridslave.setfocus()
thisform.pageframe1.page1.gridslave.activatecell(thisform.pageframe1.page1.gridslave.activerow,1)
< /pre>
proc save - save all data
< pre>
local ldatamaster,ldataslave,llink,lmasterlink,lerror
ldatamaster=thisform.datamaster
ldataslave=thisform.dataslave
llink=thisform.datalink
lmasterlink=thisform.datamaster+'.'+thisform.datalink
thisform.activarecimp && sets a focus on first textbox
sele (ldatamaster)
if thisform.writebuffer()
begin transaction
lerror=(txnlevel()=0)
if !lerror
if getfldstate(-1)=replicate("1",fcount()+1)
=setfldstate(2,2)
endif
=reccount()
lerror=!tableupdate(.T.)
sele (ldatamaster)
FLUSH
if !lerror
select (ldataslave)
=reccount()
lerror=!tableupdate(.T.)
endif
if !lerror
end transaction
FLUSH
sele (ldatamaster)
GO (RECNO())
wait window nowait 'Informatii salvate!'
??chr(7)
else
thisform.lockscreen=.t.
rollback
thisform.refreshform()
thisform.lockscreen=.f.
=aerror(laerror)
thisform.error(laerror[1],laerror[2],0)
endif
endif
endif
sele (ldatamaster)
thisform.refreshform()
return !lerror
< /pre>
=reccount(), flush was addeded in try to resolve the problem
Previous
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