Changeset 4262
- Timestamp:
- Jun 14, 2005, 3:47:30 PM (21 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 4 edited
-
dataIO/psDB.c (modified) (2 diffs)
-
dataIO/psFileUtilsErrors.dat (modified) (1 diff)
-
dataIO/psFileUtilsErrors.h (modified) (2 diffs)
-
db/psDB.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/dataIO/psDB.c
r4256 r4262 12 12 * @author Joshua Hoblitt 13 13 * 14 * @version $Revision: 1.2 2$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-06-15 01: 01:08$14 * @version $Revision: 1.23 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-06-15 01:47:30 $ 16 16 * 17 17 * Copyright 2005 Joshua Hoblitt, University of Hawaii … … 159 159 bool psDBChange(psDB *dbh, const char *dbname) 160 160 { 161 // Verify database object is valid 162 if(dbh == NULL) { 163 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 164 PS_ERRORTEXT_psDB_INVALID_PSDB); 165 return false; 166 } 167 168 // Attempt to select new database 161 169 if (mysql_select_db(dbh->mysql, dbname) != 0) { 162 psError(PS_ERR_UNKNOWN, true, "Failed to change database. Error: %s", mysql_error(dbh->mysql)); 170 psError(PS_ERR_UNKNOWN, true, PS_ERRORTEXT_psDB_FAILED_TO_CHANGE, 171 mysql_error(dbh->mysql)); 163 172 164 173 return false; -
trunk/psLib/src/dataIO/psFileUtilsErrors.dat
r4256 r4262 59 59 psDB_INVALID_PSDB Invalid psDB has been specified. 60 60 psDB_FAILED_TO_CONNECT Failed to connect to database. Error: %s 61 psDB_FAILED_TO_CHANGE Failed to change database. Error: %s 61 62 # 62 63 -
trunk/psLib/src/dataIO/psFileUtilsErrors.h
r4256 r4262 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.1 5$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-06-15 01: 01:08$9 * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-06-15 01:47:30 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 78 78 #define PS_ERRORTEXT_psDB_INVALID_PSDB "Invalid psDB has been specified." 79 79 #define PS_ERRORTEXT_psDB_FAILED_TO_CONNECT "Failed to connect to database. Error: %s" 80 #define PS_ERRORTEXT_psDB_FAILED_TO_CHANGE "Failed to change database. Error: %s" 80 81 //~End 81 82 -
trunk/psLib/src/db/psDB.c
r4256 r4262 12 12 * @author Joshua Hoblitt 13 13 * 14 * @version $Revision: 1.2 2$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-06-15 01: 01:08$14 * @version $Revision: 1.23 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-06-15 01:47:30 $ 16 16 * 17 17 * Copyright 2005 Joshua Hoblitt, University of Hawaii … … 159 159 bool psDBChange(psDB *dbh, const char *dbname) 160 160 { 161 // Verify database object is valid 162 if(dbh == NULL) { 163 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 164 PS_ERRORTEXT_psDB_INVALID_PSDB); 165 return false; 166 } 167 168 // Attempt to select new database 161 169 if (mysql_select_db(dbh->mysql, dbname) != 0) { 162 psError(PS_ERR_UNKNOWN, true, "Failed to change database. Error: %s", mysql_error(dbh->mysql)); 170 psError(PS_ERR_UNKNOWN, true, PS_ERRORTEXT_psDB_FAILED_TO_CHANGE, 171 mysql_error(dbh->mysql)); 163 172 164 173 return false;
Note:
See TracChangeset
for help on using the changeset viewer.
