#ifndef __ERROR_CHKS_H #define __ERROR_CHKS_H /*------------------------------------------------------------------------- * Copyright (c) 1999-2000 Kenneth W. Sodemann (stufflehead@bigfoot.com) *------------------------------------------------------------------------- * error_chks * * Synopsis: * Error checking, and msg displaying routines. * * $Id: error_chks.h,v 1.5 2000/11/23 13:23:36 stuffle Exp $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to * Free Software Foundation, Inc. * 59 Temple Place, Suite 330 * Boston, MA 02111-1307 USA * *------------------------------------------------------------------------- */ #include #include /*------------------------------------------------------------------------- * Function: chk_sql_error * * Synopsis: * Check the status of the execution of a SQL statement, and display * an error if the status is not OK. * * Inputs: * res : pointer to the result set to be checked * descr_text : descr of operation attempted * * Outputs: * None. * * Return Value: * TRUE if the status was OK, FALSE otherwise. * *------------------------------------------------------------------------- */ gboolean chk_sql_error (PGresult *res, const char *descr_text); /*------------------------------------------------------------------------- * Function: sql_result_ok * * Synopsis: * Check the results of a sql execution to see if all went OK. * * Inputs: * res : pointer to the result set to be checked * * Outputs: * None. * * Return Value: * TRUE if the status was OK, FALSE otherwise. * *------------------------------------------------------------------------- */ gboolean sql_result_ok (PGresult *res); /*------------------------------------------------------------------------- * Function: * * Synopsis: * * Inputs: * None. * * Outputs: * None. * * Return Value: * None. * *------------------------------------------------------------------------- */ #endif