Changeset 4262 for trunk/psLib/src/db
- Timestamp:
- Jun 14, 2005, 3:47:30 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/db/psDB.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
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.
