Answer the question
In order to leave comments, you need to log in
How to implement multi-field search in C# + SQL Server?
Hello.
There is a database with a table of patients:
On the form (C#) there are fields for entering a value and searching for records in the table by the given value, with subsequent output to dataGridView1. It is not difficult to implement a search by one of the criteria. But how to make it so that if 2 fields are filled in, I would search accordingly only for two fields (for example, Last Name and Date of Birth) or 3 (by analogy). I would like to get by with some kind of concise solution. without building a huge if else.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question