public static void SetErrorFunc()
        {
            if (errorTrapped)
            {
                return;
            }

            queue = new Queue(10);

            VistaDBAPI.ivdb_ErrorLevel(2);

            errorFunc = new VDBUserErrorFunc(UserErrorFunc);
            VistaDBAPI.ivdb_SetErrorFunc(errorFunc, 0);
            errorTrapped = true;
        }