| 643 | //------------------------------------------------------------------------------ |
| 644 | |
| 645 | bool vtkSQLiteQuery::BindInt64Parameter(int index, vtkTypeInt64 value) |
| 646 | { |
| 647 | if (!this->Private->Statement) |
| 648 | { |
| 649 | vtkErrorMacro(<< "No statement available. Did you forget to call SetQuery?"); |
| 650 | return false; |
| 651 | } |
| 652 | |
| 653 | if (this->Active) |
| 654 | { |
| 655 | this->Active = false; |
| 656 | sqlite3_reset(this->Private->Statement); |
| 657 | } |
| 658 | int status = |
| 659 | sqlite3_bind_int(this->Private->Statement, index + 1, static_cast<sqlite_int64>(value)); |
| 660 | |
| 661 | if (status != SQLITE_OK) |
| 662 | { |
| 663 | std::ostringstream errormessage; |
| 664 | errormessage << "sqlite_bind_int64 returned error: " << status; |
| 665 | this->SetLastErrorText(errormessage.str().c_str()); |
| 666 | vtkErrorMacro(<< this->GetLastErrorText()); |
| 667 | return false; |
| 668 | } |
| 669 | return true; |
| 670 | } |
| 671 | |
| 672 | //------------------------------------------------------------------------------ |
| 673 |
no test coverage detected