I'm trying to repair some relationships in a database and I've created an xml copy of a backup DB. Do you need to drop all existing relationships first. I tried DropRelationships from here Importing/Exporting Relationships Function DropRelationships() With CurrentDb For Each rel In .Relations .Relations.Delete Name:=rel.Name Next End With End Function
and I get "The database engine could not lock table 'MSysAccessStorage' because it is already in use by another person or process. " In addition when trying to import the xml file, I get an error on this line. relAttr = xmlRel.selectSingleNode("Attributes").Text It appears to be looking for a string value like dbRelationUpdateCascade + dbRelationDeleteCascade The xml file has a number like 4352 So do I need to create a routine to change the number into the constant names above to get it to work. I did find some code here https://www.access-programmers.co.uk/forums/threads/how-to-get-foreigntable-field-and-relationship-types-using-vba.267268/ that I can change to get the constant names. Is this the correct way to get this to work. How do you work around this. I am a novice programmer, so a one word answer may not help. Sorry and thanks.
I tried deleting the lock file with no success.