| 615 | //------------------------------------------------------------------------------ |
| 616 | |
| 617 | bool vtkSQLiteQuery::BindIntegerParameter(int index, int value) |
| 618 | { |
| 619 | if (!this->Private->Statement) |
| 620 | { |
| 621 | vtkErrorMacro(<< "No statement available. Did you forget to call SetQuery?"); |
| 622 | return false; |
| 623 | } |
| 624 | |
| 625 | if (this->Active) |
| 626 | { |
| 627 | this->Active = false; |
| 628 | sqlite3_reset(this->Private->Statement); |
| 629 | } |
| 630 | int status = sqlite3_bind_int(this->Private->Statement, index + 1, value); |
| 631 | |
| 632 | if (status != SQLITE_OK) |
| 633 | { |
| 634 | std::ostringstream errormessage; |
| 635 | errormessage << "sqlite_bind_int returned error: " << status; |
| 636 | this->SetLastErrorText(errormessage.str().c_str()); |
| 637 | vtkErrorMacro(<< errormessage.str()); |
| 638 | return false; |
| 639 | } |
| 640 | return true; |
| 641 | } |
| 642 | |
| 643 | //------------------------------------------------------------------------------ |
| 644 |
no test coverage detected