IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 4271


Ignore:
Timestamp:
Jun 15, 2005, 9:52:21 AM (21 years ago)
Author:
evanalst
Message:

Update psDBDropTable to handle invalid parameters.

Location:
trunk/psLib/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/dataIO/psDB.c

    r4269 r4271  
    1212 *  @author Joshua Hoblitt
    1313 *
    14  *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2005-06-15 03:20:04 $
     14 *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2005-06-15 19:52:21 $
    1616 *
    1717 *  Copyright 2005 Joshua Hoblitt, University of Hawaii
     
    230230    bool            status;
    231231
     232    // Create SQL command string to drop table
    232233    psStringAppend(&query, "DROP TABLE %s", tableName);
    233234
     235    // Execute query
    234236    status = p_psDBRunQuery(dbh, query);
    235237    if (!status) {
    236         psError(PS_ERR_UNKNOWN, false, "Failed to drop table.");
     238        psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psDB_TABLE_DROP_FAIL);
    237239    }
    238240
  • trunk/psLib/src/dataIO/psFileUtilsErrors.dat

    r4269 r4271  
    6464psDB_TABLE_CREATE_FAIL                 Failed to create table.
    6565psDB_SQL_QUERY_FAIL                    Failed to execute SQL query.  Error: %s
     66psDB_TABLE_DROP_FAIL                   Failed to drop table.
    6667#
    6768
  • trunk/psLib/src/dataIO/psFileUtilsErrors.h

    r4269 r4271  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-06-15 03:20:04 $
     9 *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-06-15 19:52:21 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    8383#define PS_ERRORTEXT_psDB_TABLE_CREATE_FAIL "Failed to create table."
    8484#define PS_ERRORTEXT_psDB_SQL_QUERY_FAIL "Failed to execute SQL query.  Error: %s"
     85#define PS_ERRORTEXT_psDB_TABLE_DROP_FAIL "Failed to drop table."
    8586//~End
    8687
  • trunk/psLib/src/db/psDB.c

    r4269 r4271  
    1212 *  @author Joshua Hoblitt
    1313 *
    14  *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2005-06-15 03:20:04 $
     14 *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2005-06-15 19:52:21 $
    1616 *
    1717 *  Copyright 2005 Joshua Hoblitt, University of Hawaii
     
    230230    bool            status;
    231231
     232    // Create SQL command string to drop table
    232233    psStringAppend(&query, "DROP TABLE %s", tableName);
    233234
     235    // Execute query
    234236    status = p_psDBRunQuery(dbh, query);
    235237    if (!status) {
    236         psError(PS_ERR_UNKNOWN, false, "Failed to drop table.");
     238        psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psDB_TABLE_DROP_FAIL);
    237239    }
    238240
Note: See TracChangeset for help on using the changeset viewer.