private synchronized void notifyParamUsage(DBCommandParam param)
{
int index = cmdParams.indexOf(param);
if (index < paramUsageCount)
{ // Error: parameter probably used twice in statement!
throw new MiscellaneousErrorException("A parameter may only be used once in a command.");
}
if (index > paramUsageCount)
{ // Correct parameter order
cmdParams.remove(index);
cmdParams.insertElementAt(param, paramUsageCount);