日期:2014-05-17  浏览次数:20907 次

集合已修改;枚举操作可能无法执行。
 string ConnMdbStr = "Data Source='" + txtsqlip.Text + "' ;Initial Catalog='" + dataname.Text + "';User ID=sa;Password='" + txtpassword.Text + "'";
                    SqlConnection ConnMdb = new SqlConnection(ConnMdbStr);
                    string SqlText = "SELECT * FROM Group_SGK3 ";
                    SqlDataAdapter da = new SqlDataAdapter(SqlText, ConnMdb);
                    try
                    {
                        //da.Fill(dt);
                        dtData.Clear();
                        da.Fill(dtData);

                    }
                    catch
                    {
                        break;
                    }
                    //}

                    

                    foreach (DataRow dr in dtData.Rows)     //遍历行 in 行的集合
                    {
                        byte[] EDS = new byte[183];
                        EDS[0] = 0x82;  // emm table id
                        EDS[1] = 0x40;   // 
                        EDS[2] = 0x3f;
                        EDS[3] = 0x02;// emm secton length