Ejemplo n.º 1
0
        static void Handle_Exception(CtreeSqlException e)
        {
            int TABLE_ALREADY_EXISTS = -20041;
            int INDEX_ALREADY_EXISTS = -20028;

            if (e.ErrorNumber == TABLE_ALREADY_EXISTS ||
                e.ErrorNumber == INDEX_ALREADY_EXISTS)
            {
                return;
            }
            else
            {
                Console.WriteLine("Error: " + e.ErrorNumber + " - " + e.ErrorMessage);
                if (e.ErrorNumber == -30096 || e.ErrorNumber == -20212)
                {
                    Console.WriteLine("Perhaps your c-tree server is not running?");
                }
            }
            Error_Exit();
        }
Ejemplo n.º 2
0
        static void Handle_Exception(CtreeSqlException e)
        {
            int TABLE_NOT_FOUND      = -20005;
            int CONSTRAINT_VIOLATION = -20116;

            if (e.ErrorNumber == TABLE_NOT_FOUND ||
                e.ErrorNumber == CONSTRAINT_VIOLATION)
            {
                return;
            }
            else
            {
                Console.WriteLine("Error: " + e.ErrorNumber + " - " + e.ErrorMessage);
                if (e.ErrorNumber == -30096 || e.ErrorNumber == -20212)
                {
                    Console.WriteLine("Perhaps your c-tree server is not running?");
                }
            }
            Error_Exit();
        }