[vtkusers] [EXTERNAL]  vtkSQLDatabaseTableSource.update()
    David Thompson 
    dcthomp at sandia.gov
       
    Mon Mar 19 14:01:36 EDT 2012
    
    
  
Hi Matthew,
You'll need to mark the vtkSQLDatabaseTableSource instance as modified  
in order for Update() to re-execute the pipeline; otherwise, it will  
return the previous results. For example, just after "//add values to  
table", add
     databaseTable->Modified();
and you should see the new values.
	David
On Mar 16, 2012, at 21:16 , Matthew Green wrote:
> Hi,
>
> Does vtkSQLDatabaseTableSource have the ability to update and re- 
> execute the sql query?
>
> <code>
> vtkTable* table;
> VTK_CREATE( vtkSQLDatabaseTableSource, databaseTable );
> databaseTable->SetURL("sqlite://database.db");
> databaseTable->SetQuery("SELECT * FROM MYTABLE");
> table = databaseTable->GetOutput();
> table->Update();
> table->Dump();
>
> //add values to table
>
> table->Update();
> table->Dump();
> //does not contain the new values
> </code>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
    
    
More information about the vtkusers
mailing list