Search code examples
c#typed-dataset

typedDataSet activate query C#


I have a TypedDataSet object. and i have a query "select name from t_table where name LIKE '%(text from user)'; how can i insert this query into the data set and activate it on t_table? i need to get a text from the user and activate the query by what he gave me. how do i do that?


Solution

  • If You want a benefit of types dataset then you have to add table to the designer other wise it would be complex to do same thing by coding IMO.

    Follow this instructions to use typed dataset.


    alt text

    I just added one more query with where clause, Now you need to just call

    Adapter.FillByName(tablename,value of parameter)