Passing a SQL parameter to an IN() clause using typed datasets in .NET

后端 未结 8 2078
别跟我提以往
别跟我提以往 2020-11-28 10:31

First apologies as there are similar questions on this site, but none of them answer this problem directly.

Im using typed datasets in VS 2010. I create a TableAdapt

8条回答
  •  臣服心动
    2020-11-28 11:10

    @Joe is right.

    Or you can use foreach loop to do that.

    Something like:

       int[] arr = new int[3]; 
        arr[0] = "1";        
        arr[1] = "2";             
        arr[2] = "3";             
    
    foreach(vat data in arr)
    {
    
    //Do your Code here
    
    // 
    var MyDatatable = obj.GetDatabyID(data);
    
    TableAdapter.Fill(MyDataTable);
    
    }
    

    Regards

提交回复
热议问题