'''寫一個循環到你的dataset.tables(0)去找...    
For lint_row As Integer = 0 To dataset.Tables(0).Rows.Count - 1
        dataset.Tables(0).Rows(lint_row).Item("ID") = 10
        System.Windows.Forms.MessageBox.Show(dataset.Tables(0).Rows(lint_row).Item("ID"))
   Next

解决方案 »

  1.   

    foreach(DataRow row in dataset.tables[0].rows)
    {
       if(row["id"] == "10")
       {
          break;
       }
    }
      

  2.   

    '''不好意思,寫丟了判斷語句...
    For lint_row As Integer = 0 To dataset.Tables(0).Rows.Count - 1
          if  dataset.Tables(0).Rows(lint_row).Item("ID") = 10 then
            System.Windows.Forms.MessageBox.Show(dataset.Tables(0).Rows(lint_row).Item("ID"))
         end if 
       Next
      

  3.   

    用find或DataRow[] row=dataset.tables[0].select(id='10')
      

  4.   

    C# 的寫法:
        
        int lint_row=0;
         while(lint_row < dataset.Tables[0].Rows.Count)
    {
        if (dataset.Tables[0].Rows[lint_row]["ID"]=10)
            {
    System.Windows.Forms.MessageBox.Show("找到了...");
             }
    }