[vtkusers] [EXTERNAL] vtkSQLDatabaseTableSource.update()
Darshan Pai
darshanpai at gmail.com
Sat Mar 24 01:13:42 EDT 2012
I have exact same problem with vtkQTTableView , when I modify the vtkTable
On Fri, Mar 23, 2012 at 10:29 PM, Matthew Green <babygguy at gmail.com> wrote:
> Thanks for the reply,
>
> I still haven't been able to get this to work.
>
> <code>
> //add values to table
> databaseTable->Modified();
> databaseTable->Update();
> table = databaseTable->GetOutput();
> table->Modified();
> table->Update();
> table->Dump();
> //does not contain the new values
> </code>
>
> new values still don't appear. I know I've done the update
> correctly because if I create a new vtkSQLDatabaseTableSource object it
> contains the new values exist.
>
> Thanks,
> Matt
>
> On Tue, Mar 20, 2012 at 4:01 AM, David Thompson <dcthomp at sandia.gov>wrote:
>
>> 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<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 <http://www.vtk.org/Wiki/VTK_FAQ>
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/**listinfo/vtkusers<http://www.vtk.org/mailman/listinfo/vtkusers>
>>>
>>
>>
>>
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120324/de5631fb/attachment.htm>
More information about the vtkusers
mailing list