sharing data (OpenInsight Specific)
At 18 JUN 1998 07:13:33PM David Kirch wrote:
The first system that I wrote in OI was to keep track of movies on VHS Tapes. The problem is that my girlfriend liked it and took a copy. Now were moving in together and need to combine the databases. I don't know how. Can anyone help?
David Kirch
At 19 JUN 1998 10:20AM Blaise(Revelation) wrote:
David,
There is no utility or stored procedure in OI that will do this for you, but it can be done. You will have to write a function or subroutine to loop thru the data in one of the tables and write them to the other table. What is not simple about this routine is what you want to do with the data. Do you want to overwrite records with the same keys? Do you want to keep both records? If you need to keep both, you will have to assign those records new keys. You will have to determine the answers to questions like that before you write your code.
What I suggest, is to back-up your tables so you'll have something to go back to if it fails in anyway.
Good Luckā¦
Blaise
At 27 JUN 1998 04:03PM Gary Gnu wrote:
It can't be. Revelation Software does not condone living in sin.
However, we gnus do. Call it the call of the wildebeast.
Alias in the old table and select. You now have two processes to contend with. One is duplicate keys and the other is duplicate records. This is not the same as the one hump two hump argument. Her record 123 could be Out of Africa while your record 123 is Rocky IV, the Transfusion. On the other paw, it could be that your instance of the Lion King is 782 whilst hers is 723.
So, what you need to do is check to see if the movie exists. If not, then check to see if the current key exists. If not, just write it out. If it does, then get the next current key.
If the flick is there, then you have to decide what information needs to be updated and update from the old to the new.
Same thing goes for all the other tables.
Have fun.
Gary.