I have 6 bool "categories":
Category0, Category1, Category2, Category3, Category4, Category5.
I also have a "String ListCat" variable. This variable must look like something like:
ListCat = "0,1,2,3,4,5"
Where "0" is displayed if Category0 = true, "1" if category1 = true...
For exemple :
Categorie0 = true;
Catgorie1 = true;
Categorie5 = true;
Then ListCat would be like :
ListCat ="0,1,5"
I have to do this to complete this query :
string StSQL = @"SELECT [Type Jour] FROM CodificationTypesJour where Categorie IN (" + ListCat + ");
How can I do that, with the commas included?
Thanks in advance.