The whole things looks like a database and you might be able to utilize some of the database UDFs like DBCommand().
_________________________
There are two types of vessels, submarines and targets.