Parent Child Table (part 4)
Welcome back! Continuing on with the Save Procedure. In order for the children to be linked to their Parent, the Parent MUST be saved prior to the children. So, lets focus in on the bottom end of the SQL INSERT: PassFail = DB::Update(DBID, Sql$) If PassFail *Class\State = DB::#Clean *Class\ID = DB::getLastID(DBID, "Galaxy") EndIf DB::Close(DBID) ;----------------------------------------------- SaveSolarSystemCollection(*Class) ;----------------------------------------------- As you can see once we close the database and retrieve the Parent's ID from the database, we then call the Save Children Procedure. On the SQL UPDATE, we are free to call the Child Save Procedure immediately after the Close Procedure. PassFail = DB::Update(DBID, Sql$) If PassFail *Class\State = DB::#Clean EndIf DB::Close(DBID) ;--------------------...