| 576 | |
| 577 | |
| 578 | int CppSQLite3Statement::execDML() |
| 579 | { |
| 580 | checkDB(); |
| 581 | checkVM(); |
| 582 | |
| 583 | const char* szError=0; |
| 584 | |
| 585 | int nRet = sqlite3_step(mpVM); |
| 586 | |
| 587 | if (nRet == SQLITE_DONE) |
| 588 | { |
| 589 | int nRowsChanged = sqlite3_changes(mpDB); |
| 590 | |
| 591 | nRet = sqlite3_reset(mpVM); |
| 592 | |
| 593 | if (nRet != SQLITE_OK) |
| 594 | { |
| 595 | szError = sqlite3_errmsg(mpDB); |
| 596 | throw CppSQLite3Exception(nRet, szError); |
| 597 | } |
| 598 | |
| 599 | return nRowsChanged; |
| 600 | } |
| 601 | else |
| 602 | { |
| 603 | nRet = sqlite3_reset(mpVM); |
| 604 | szError = sqlite3_errmsg(mpDB); |
| 605 | throw CppSQLite3Exception(nRet, szError); |
| 606 | } |
| 607 | } |
| 608 | |
| 609 | |
| 610 | CppSQLite3Query CppSQLite3Statement::execQuery() |
no test coverage detected