General information
Category:
The Mere Mortals Framework
Title:
Transfer/Conversion of Old System Data Into Mere Mortals App
Having successfully created a new MM app using Quick Start, I am now attempting to transfer/convert a unnormalized User.DBF table from the companys Old system to the Users.DBF, Group.DBF, and UsGrLink.DBF of my new MM app. I am attempting to write a transfer/convert program external to the MM app, therefore I think I need to create one or more business objects to create New() records in the User, Group, and UsGrLink tables, and Save() them. Thinking I would find the appropriate business class(s), from which I may instantiate the business objects I need, referenced in the UsesForm class in the aForms.VCX, I looked there, but did not find it/them. I also looked in the cUsersForm class in the cForms.VCX, and did not find it/them there either. There are no business objects predefined in the aBizness.VCX.
Does anyone know the classes I may use to;
DO SetX
loUserObj = CREATEOBJ('UsersBizObj')
loGroupObj = CREATEOBJ('GroupBizObj')
loUsGrObj = CREATEOBJ('UsGrBizObj')
or the link?
In general, how would you recommend creating transfer/conversion program? I've written up the following psuedo code as a guideline for myself. Would anyone have any actual transfer/conversion code that I may view to help me get going? It would be appreciated. Thank you.
*--------------------------------------------------------------------------
*
* Open source table (ALIAS InTbl), setting ORDER appropriately
*
* Open related table(s), if any, setting ORDERs appropriately.
* Optionally, ZAP any of the related table(s).
* Optionally, reset destination tables' ID.DBF ID ''Value' to "1"
* Optionally, reset related table(s) ID.DBF ID 'Value' to "1"
*
* Open destination table (ALIAS OutTbl)
* Optionally, ZAP destination table.
* Optionally, reset destination tables' ID.DBF ID ''Value' to "1"
*
* Instantiate Business Object of destination table(s)
* DO SetX
* loObj = CREATEOBJ('MyBizObj')
* Will this open the destination table(s)?
* Optionally, ZAP destination table.
* Optionally, reset destination tables' ID.DBF ID ''Value' to "1"
*
* SELECT InTbl
* SCAN FOR filter on empty records
* Convert source tables fields, placing values in memvars.
* IF not empty fields, etc.
* IF NOT SEEK(field value, related table, tag) or LOCATE FOR ... IF NOT FOUND()
* Create New() record(s) in related table(s), if any.
* loObj.New()
* ENDIF
* ENDIF
* Seek ID's for related records in related table(s), if any.
*
* Create New() record in destination table.
* Fill destination tables' record with values
* Save() destination tables' record
* lnRetVal = loObj.Save()
*
* ENDSCAN
*
* Close source table(s)
* Close related table(s), if any.
* Close destination table(s).
*
*--------------------------------------------------------------------------
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