void WtApplication::find()
{
  root()->addWidget(new  WText("Search"));  // show some text
  nameEdit_ = new WLineEdit(root());
  root()->addWidget(new WBreak());

  WPushButton *b = new WPushButton("Find", root()); // create a button
  b->setMargin(10, Left);                                 // add 5 pixels margin
                     // insert a line break
  greeting_ = new  WText( root());                         // empty text
  b->clicked().connect(this, &WtApplication::find);

}



void WtApplication::search() {


try {

  greeting_->setText( nameEdit_->text());                    //its
value pass to query

                          Transaction tt(session_);
                
 //colform collect = session_.find<form>("where dat like 'parvinder%'");

//its working fine

colform collect = session_.find<form>("where dat like
'%?%'").bind(nameEdit_->text());
//But this query is not fetch the value from database.
                        for (colform::const_iterator i =
collect.begin(); i != collect.end(); ++i)



                        
msg((*i)->store,(*i)->name,(*i)->contact,(*i)->intercom,(*i)->stream);
                        tt.commit();
                      } catch (...) {}

}

I think find function does not connect with search function. So that
it does not find the value.

but when we use simple query
 colform collect = session_.find<form>("where dat like 'parvinder%'");
its working fine

-- 
Parvinder Rajput
website:- www.parvinder.co.in

------------------------------------------------------------------------------
RSA&#174; Conference 2012
Save $700 by Nov 18
Register now&#33;
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to