Datatable.Select Problem
-
Hello everyone, Thank you for viewing my post. I have a question regarding the Datatable.Select method. I have a program that stores the tables from the database onto the users computer and keeps them in memory, to reduce trips to the database, and not binding my program to the database, to allow the user to make changes without affecting the data directly on the database. I need to populate a listview from the tables within the user's computer.
The query in my db is as follows: Me.lstCommodityPool.RowSource = "SELECT commodityId, tbl_Commodity.commodityName " & _ " IIf(nz(commoditySerialNum,'')='','','(S/N:' & commoditySerialNum & ')') " & _ " IIf(nz(commodityUnitNum,'')='','',' - ' & commodityUnitNum) " & _ " IIf(nz(commodityCurrentLSD,'')='','',' - ' & commodityCurrentLSD) AS commodityName " & _ " FROM tbl_Commodity " & _ " where commodityId NOT IN (select quoteCommodityId from join_tbl_Quote_Commodity " & _ " where quoteId=" & Nz(Me.txtQuoteNum) & _ " and quoteRevisionId=" & Nz(Me.txtRevNum) & _ ") and companyId=" & Nz(Me.combCompany) & _ " order by commodityName"
The question I have is how can I recreate the condition, especially the "NOT IN" clause, using the tables on the users computer? Thank you