Do I basically just have to do the inverse of the code that is in ProtocolClient.RetrieveDatabases, or is there an easier way?

No, there's a harder way

FID_DYNAMICDATABASE isn't writable. You can write the dynamic data for an individual fid by writing the FID|0xF file. The data you write to it is the WrappedDynamicData structure from lib/protocol/dyndata_format.h; version should be 1 and itemsize should be sizeof(DynamicData).

I've just looked and Emptool doesn't know about writing dynamic data (hmm, that means you can't unmark tracks from Emptool; that's a pity).

Peter