creating table adapter queries using code
-
I have searched hi and low for my answer with no success. The dataadapter design gives you a way to create multiple queries. (Fill, Fillby, Update, etc.) But, I don't wan to use the designer. I want to code it all. I have the fill. That was easy. How do I create a query method using code. Reason: In one part on my program I am getting data from a database and binding it to a datagrid. At one point I want only certain records to show. At other times I want all records to show. I want to be able to code like this:
if certainFlag = "true" then adapter.fill(datatable) else adapter.allfill(datatable) endif
How would I code the allfill query? -
I have searched hi and low for my answer with no success. The dataadapter design gives you a way to create multiple queries. (Fill, Fillby, Update, etc.) But, I don't wan to use the designer. I want to code it all. I have the fill. That was easy. How do I create a query method using code. Reason: In one part on my program I am getting data from a database and binding it to a datagrid. At one point I want only certain records to show. At other times I want all records to show. I want to be able to code like this:
if certainFlag = "true" then adapter.fill(datatable) else adapter.allfill(datatable) endif
How would I code the allfill query? -
Are you saying that I can't create a query using code? I can do it using the designer. I created one called insertRecord. I want to create one NOT using the designer but using code.