Tdatabase Question
Posted: Sat Dec 10, 2005 12:13 am
HI,
I have tried for the first time tDatabase ... wow have I been doing a lot mode code then I had to
Anyway...
I open my database like this:
Use myfile.dbf shared new
DATABASE oMyfile
As a test I open a dialog with some gets and test SAVE and CANCEL.
oMyFile:Load()
Redefine Get.... oMyfile:Field1 etc....
If the user selects SAVE I issue a oMyfile:Save()
So far it works they way I expect.
Now I ran my program twice (2 copies at the same time) and something strange happens.
If I make different changes in the 2 separate programs:
example in App1 I change field1 and in App2 I change field2.
Now I issue a SAVE() and reload the dbf data oMyfile:Load()
App1 shows the changes I made in App1 and App2 shows the changes I made in App2.
I would think that one of the Apps would give a lock error and after the LOAD() command both Apps would be the same.
Any idea why this would happen?
Thanks,
Jeff
I have tried for the first time tDatabase ... wow have I been doing a lot mode code then I had to
Anyway...
I open my database like this:
Use myfile.dbf shared new
DATABASE oMyfile
As a test I open a dialog with some gets and test SAVE and CANCEL.
oMyFile:Load()
Redefine Get.... oMyfile:Field1 etc....
If the user selects SAVE I issue a oMyfile:Save()
So far it works they way I expect.
Now I ran my program twice (2 copies at the same time) and something strange happens.
If I make different changes in the 2 separate programs:
example in App1 I change field1 and in App2 I change field2.
Now I issue a SAVE() and reload the dbf data oMyfile:Load()
App1 shows the changes I made in App1 and App2 shows the changes I made in App2.
I would think that one of the Apps would give a lock error and after the LOAD() command both Apps would be the same.
Any idea why this would happen?
Thanks,
Jeff