Changeset 21308 for trunk/ippTools/src/pxchip.c
- Timestamp:
- Feb 5, 2009, 9:35:41 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/pxchip.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/pxchip.c
r20750 r21308 235 235 PS_ASSERT_PTR_NON_NULL(config, false); 236 236 237 if (!psDBTransaction(config->dbh)) { 238 psError(PS_ERR_UNKNOWN, false, "database error"); 239 return false; 240 } 241 242 237 243 // create a chipRun 238 244 if (!chipRunInsert(config->dbh, … … 249 255 end_stage) 250 256 ) { 257 if (!psDBRollback(config->dbh)) { 258 psError(PS_ERR_UNKNOWN, false, "database error failed to rollback transaction"); 259 } 251 260 psError(PS_ERR_UNKNOWN, false, "database error"); 252 261 return 0; 253 262 } 254 263 255 return psDBLastInsertID(config->dbh); 256 } 257 264 psS64 chip_id = psDBLastInsertID(config->dbh); 265 266 // Create rows in chipImfile table for each input exposure. 267 // This creates the chip_image_id values 268 psString query = "INSERT INTO chipImfile " 269 "SELECT %" PRId64 ", class_id, 0 FROM rawImfile WHERE exp_id = %" PRId64; 270 271 if (!p_psDBRunQuery(config->dbh, query, chip_id, exp_id)) { 272 psError(PS_ERR_UNKNOWN, false, "database error"); 273 // rollback 274 if (!psDBRollback(config->dbh)) { 275 psError(PS_ERR_UNKNOWN, false, "database error"); 276 } 277 psError(PS_ERR_UNKNOWN, false, "database error"); 278 return 0; 279 } 280 if (!psDBCommit(config->dbh)) { 281 psError(PS_ERR_UNKNOWN, false, "database error"); 282 return 0; 283 } 284 285 return chip_id; 286 } 287
Note:
See TracChangeset
for help on using the changeset viewer.
