Hello there,
I have one problem in setting the filter from the above metioned object. So I have an QSqlTableModel and when I set my filter like this (line 7)
ValidToFilter->addItem("9999-12-31 23:59:59");
QString product
= ProductFilter
->currentText
();
QString date
= ValidToFilter
->currentText
();
QString eingabeFilter
= "vcProductID='"+product
+"'";
QString validationFilter
= "dtValidTo='"+date
+"'";
model->setFilter( eingabeFilter +" and "+dcPrice);
ValidToFilter->addItem("9999-12-31 23:59:59");
QString product = ProductFilter->currentText();
QString date = ValidToFilter->currentText();
QString eingabeFilter = "vcProductID='"+product+"'";
QString validationFilter = "dtValidTo='"+date+"'";
QString price = "dcPrice='0.200'";
model->setFilter( eingabeFilter +" and "+dcPrice);
To copy to clipboard, switch view to plain text mode
everything is ok with multiple filter argument but when I change the second filter argument to this
model->setFilter( eingabeFilter +" and "+validationFilter );
view->setModel(model);
model->setFilter( eingabeFilter +" and "+validationFilter );
view->setModel(model);
To copy to clipboard, switch view to plain text mode
my view is empty. The second filterargument is an Datetime type on the mssql server table
So what do I wrong I have to filter the column on the sql server. For example this is one representativ entry in the column with datetime type : 9999-12-31 23:59:59.000
anybody some idea???
Bookmarks