you might not have to do "special programming"
a simple loop over the tables might suffice
i.e.
// open a document referenced by $Doc_Ref
For ($i; 1; Size of array($Bad_Tables))
$Current_Table:=$Bad_Tables{$i}
all records($Current_Table->)
$Record_Count:=records in selection($Current_Table->)
send variable($Doc_Ref;$Record_Count)
For ($ii;1;records in selection($Current_Table->))
send record($Doc_Ref;$Current_Table->)
next record($Current_Table->)
end for
end for
NOTE: code above was written in email, so no promises about syntax etc
:)
a simple export utility not necessarily the most efficient, but always
useful to have around.
you can populate the (pointer) array $Bad_Tables as appropriate.
and a corresponding import routine
On Fri, 15 Jun 2018 12:30:54 +0100, Pat Bensky via 4D_Tech wrote:
> Chuck,
> Hmmm. this is a one-off exercise so I would prefer not to do some special
> programming. I would like to understand what's going on in the database
> though!
> Thanks
> Pat
>
> On Fri, 15 Jun 2018 at 02:51, Chuck Miller via 4D_Tech
> <[email protected]>
> wrote:
>
>> How about using sql to bring data from old database into new one
>>
>> Regards
>>
>> Chuck
>>
>> Sent from my iPhone
>>
>>> On Jun 14, 2018, at 8:36 PM, Pat Bensky via 4D_Tech <
>> [email protected]> wrote:
>>>
>>> I'm updating a client's database from an old version of my app, in 4D
>> v12,
>>> to the latest version, using v16. There have been various modifications
>> to
>>> the structure in between the version they are using and the current
>>> version. Tables have been added, deleted, repurposed. The result is that
>>> when the database is opened in the v16 version, some of the tables are
>> lost.
>>>
>>> I figured out that I should be able to fix this by using GET MISSING
>> TABLE
>>> NAMES and REGENERATE MISSING TABLE.
>>>
>>> But some of the missing table names are the same as some "live" table
>> names
>>> in the updated structure.
>>> So I changed the names of those tables in the old structure by adding
>> "_x"
>>> to each one. e.g. "data_61" becomes "data_61_x" etc.
>>>
>>> However, after opening the database in the updated (v16) structure, the
>>> missing table names list shows the ORIGINAL table names, not the MODIFIED
>>> ONES! "data_61_x" has reverted to "data_61", etc. So if I try to use
>>> REGENERATE MISSING TABLE, nothing happens because there is already a
>> table
>>> with that name.
>>>
>>> Any ideas about this?
>>> Pat
>>>
>>> --
>>> *************************************************
>>> CatBase - Top Dog in Data Publishing
>>> tel: +44 (0) 207 118 7889
>>> w: http://www.catbase.com
>>> skype: pat.bensky
>>> *************************************************
>>> **********************************************************************
>>> 4D Internet Users Group (4D iNUG)
>>> FAQ: http://lists.4d.com/faqnug.html
>>> Archive: http://lists.4d.com/archives.html
>>> Options: https://lists.4d.com/mailman/options/4d_tech
>>> Unsub: mailto:[email protected]
>>> **********************************************************************
>>
>> **********************************************************************
>> 4D Internet Users Group (4D iNUG)
>> FAQ: http://lists.4d.com/faqnug.html
>> Archive: http://lists.4d.com/archives.html
>> Options: https://lists.4d.com/mailman/options/4d_tech
>> Unsub: mailto:[email protected]
>> **********************************************************************
>
>
>
> --
> *************************************************
> CatBase - Top Dog in Data Publishing
> tel: +44 (0) 207 118 7889
> w: http://www.catbase.com
> skype: pat.bensky
> *************************************************
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ: http://lists.4d.com/faqnug.html
> Archive: http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub: mailto:[email protected]
> **********************************************************************
---------------
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************