------------------------------------------------------------------------------
| 28 | |
| 29 | //------------------------------------------------------------------------------ |
| 30 | bool vtkTableToDatabaseWriter::SetDatabase(vtkSQLDatabase* db) |
| 31 | { |
| 32 | if (!db) |
| 33 | { |
| 34 | return false; |
| 35 | } |
| 36 | this->Database = db; |
| 37 | if (!this->Database->IsOpen()) |
| 38 | { |
| 39 | vtkErrorMacro(<< "SetDatabase must be passed an open database connection"); |
| 40 | this->Database = nullptr; |
| 41 | return false; |
| 42 | } |
| 43 | |
| 44 | if (!this->TableName.empty()) |
| 45 | { |
| 46 | return this->TableNameIsNew(); |
| 47 | } |
| 48 | return true; |
| 49 | } |
| 50 | |
| 51 | //------------------------------------------------------------------------------ |
| 52 | bool vtkTableToDatabaseWriter::SetTableName(const char* name) |