How Can I Filter An Ms-access Databse, Using Qsqltablemodel And Qlineedit?
I'm building a GUI that allows users to search information in a ms access database (yup. It has to be the ms access) The user has a textfield where he can type his search and the T
Solution 1:
MS-Access needs a double apostrophe like:
def update_filter(self, s):
s = re.sub(r"[\W_]+", "", s)
filter_str = f"Produkt '%{s}%'"
self.model.setFilter(filter_str)```
Post a Comment for "How Can I Filter An Ms-access Databse, Using Qsqltablemodel And Qlineedit?"