| 50 | } |
| 51 | |
| 52 | static void drop(IAttachment** att) |
| 53 | { |
| 54 | // With CheckStatusWrapper passed as status interface noting is thrown on error |
| 55 | // You should check status yourself |
| 56 | CheckStatusWrapper status(master->getStatus()); |
| 57 | |
| 58 | // drop database (will close interface) |
| 59 | (*att)->dropDatabase(&status); |
| 60 | if (status.getState() & IStatus::STATE_ERRORS) |
| 61 | { |
| 62 | errPrint(&status); |
| 63 | fprintf(stderr, "*** Drop database failed - do it manually before next run ***\n"); |
| 64 | } |
| 65 | else |
| 66 | *att = NULL; |
| 67 | |
| 68 | // cleanup |
| 69 | status.dispose(); |
| 70 | } |
| 71 | |
| 72 | int main() |
| 73 | { |