nTotal_Relations = ADBOBJECTS(aAll_Relations, "Relation") > lcRelString="" > FOR m.nLoop = 1 TO m.nTotal_Relations > lcRelString = lcRelString + c_Tab + c_Tab + "ALTER TABLE '" + aAll_Relations[m.nLoop,1] +; > "' DROP FOREIGN KEY TAG " +; > aAll_Relations[m.nLoop,3] + crlf > ENDFOR >>...which is the part which reads them from the dbc and generates code to drop them; then this generates code to recreate them:
lcRelString="" > FOR m.nLoop = 1 TO m.nTotal_Relations > lcRelString = lcRelString + c_Tab + c_Tab + "ALTER TABLE '" + aAll_Relations[m.nLoop,1] +; > "' ADD FOREIGN KEY TAG " +; > aAll_Relations[m.nLoop,3] +; > " REFERENCES " + ; > IIF(" " $ aAll_Relations[m.nLoop,2], ["], []) + ; > aAll_Relations[m.nLoop,2] +; > IIF(" " $ aAll_Relations[m.nLoop,2], ["], []) + ; > " TAG " + aAll_Relations[m.nLoop,4] + crlf > ENDFOR >Hi Dragan!