| 672 | //------------------------------------------------------------------------------ |
| 673 | |
| 674 | bool vtkSQLiteQuery::BindDoubleParameter(int index, double value) |
| 675 | { |
| 676 | if (!this->Private->Statement) |
| 677 | { |
| 678 | vtkErrorMacro(<< "No statement available. Did you forget to call SetQuery?"); |
| 679 | return false; |
| 680 | } |
| 681 | |
| 682 | if (this->Active) |
| 683 | { |
| 684 | this->Active = false; |
| 685 | sqlite3_reset(this->Private->Statement); |
| 686 | } |
| 687 | |
| 688 | int status = sqlite3_bind_double(this->Private->Statement, index + 1, value); |
| 689 | |
| 690 | if (status != SQLITE_OK) |
| 691 | { |
| 692 | std::ostringstream errormessage; |
| 693 | errormessage << "sqlite_bind_double returned error: " << status; |
| 694 | this->SetLastErrorText(errormessage.str().c_str()); |
| 695 | vtkErrorMacro(<< this->GetLastErrorText()); |
| 696 | return false; |
| 697 | } |
| 698 | return true; |
| 699 | } |
| 700 | |
| 701 | //------------------------------------------------------------------------------ |
| 702 |
no test coverage detected