| Subject |
Append problem xdml |
| From |
Charlie <tm@tc.com> |
| Date |
Sun, 08 Nov 2020 05:23:24 -0500 |
| Newsgroups |
dbase.getting-started |
| Attachment(s) |
talfinis.prg |
I have a program written a long time ago for dbase 4 dos that I still use today with oodml and it works well. I don\'t want to make major changes to it for that reason. It is an attachment to this message.
Basically it finishes the task of adding new inventory by using two tables replacing fields into the master table from the taldata table.
I am now trying to add a new feature that will allow an independent computer using the same software to add additional new inventory then append it into the taldata table before running the talfinis.prg which actually works well as long as all items have been already established on the master table.
On the main computer if you add a brand new record it simply appends a blank record and proceeds from there.
If using a different computer and presenting a new row it does that on the different computer into the master table but i am having troublefixing the main computer to append the blank in the same table before running talfinis.prg
I tried this before talfinish.prg:
use taldata order lname
do while not eof()
partno = part_no
set filter to part_no = partno
count to cnt
if cnt > 1
cntr = cnt
do while cntr > 1
delete
cntr = cntr - 1
enddo
replace qty with cnt
set filter to
endif
skip
enddo
And it does add the blank correctly but it also changes somehow the size of taldata.dbf and fails when you try to run talfinis.prg. I think it has something to do with an indexing problem. What happens is instead of replacing all fields, only the last record in taldata is changed. So if you add a total of 60 records in master.dbf, the last record of corresponding taldata.dbf shows a quantity of 60. I have tried to reindex taldata.dbf but i don't think that helped.
i'm thinking possibly I can fix this in talfinis.prg but with the set relation, i'm not sure what to do.
If worse comes to worse i can just tell the operator of the other computer not to introduce an item not already in master.dbf.
Sorry this is so long and probably confusing. Just one of those stupid problems that I hope there is an easy fix for.
|
|