Hello,

I am working on an application which queries a sqlite3 database and adds columns to a WTableView so that they can be displayed on a web browser. The data that is displayed on the web browser is editable but I do not want to write the edited result to the same table which it was queried from.

class mainWindow : public WContainerWidget
{
public:
  mainWindow (dbo::Session & session, WContainerWidget *parent=0)
    : WContainerWidget (parent)
  {

dbo::QueryModel< dbo::ptr<Panel1> > *model = new dbo::QueryModel< dbo::ptr<Panel1> >();
    model->setQuery(session.find<Panel1>());
    model->addColumn("Config_Cal_Position_THClosedB",ItemIsEditable);
    model->addColumn("Config_IDs_Rams_Ram1AID",ItemIsEditable);


    WTableView *view = new WTableView (this);
    view->resize(800, 300);
    view->setSelectionMode(SingleSelection);
    view->setModel(model);


  }


The <Panel1> table is a view only table, in order to edit the data I have to do so through an instruction table via the following sqlite3 command

/insert into instructions(instruction_type, port, param1, param2, param3) values (0, <1-4>, 86, <register name>, <register value>); /

So basically, I am attempting to read from table <Panel1>, have the ability to edit the data on a browser, and write the edited result to the <register value> parameter of the instruction table.

Your help would be greatly appreciated!

Thanks,
Joel
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to