| 543 | } |
| 544 | |
| 545 | bool ProjectFileIO::CloseConnection() |
| 546 | { |
| 547 | auto &curConn = CurrConn(); |
| 548 | if (!curConn) |
| 549 | return false; |
| 550 | |
| 551 | if (!curConn->Close()) |
| 552 | { |
| 553 | return false; |
| 554 | } |
| 555 | curConn.reset(); |
| 556 | |
| 557 | SetFileName({}); |
| 558 | |
| 559 | return true; |
| 560 | } |
| 561 | |
| 562 | // Put the current database connection aside, keeping it open, so that |
| 563 | // another may be opened with OpenConnection() |