Parent Child Table (Part 3)
Moving on to the Find Methods. Here again we have some changes. After we load up our Parent Record, we then need to load up its children. I'll focus in on the in the code segment below: PassFail = DB::Query(DBID, Sql$) If PassFail While NextDatabaseRow(DBID) With *Class \ID = GetDatabaseLong(DBID, DatabaseColumnIndex(DBID,"ID")) \Name = GetDatabaseString(DBID, DatabaseColumnIndex(DBID,"Name")) \State = DB::#Clean EndWith Wend EndIf DB::Close(DBID) ClearList(*Class\SolarSystemCollection.SOLARSYSTEM::SolarSystem()) ;----------------------------------------------- LoadSolarSystemCollection(*Class) ;----------------------------------------------- ProcedureReturn PassFail Here you can see After the Parent Record is loaded, and the database Closed, we then Clear the List in preparation for loading it, then we call a new Procedure to Load the Child Collection. ...