我要做个实体类生成器 只需要输入数据库名 就可以把数据库的所有表全部生成为实体类
现在主要是从数据库把所有的表名都读出来了 不知道用什么装 我要foreach 一个一个的读表名
就这点小要求

解决方案 »

  1.   

    ..............你的意思 我明白 但是 你需要明白的是    sqlserver中  caozuo的永远都只是表! 而不是 数据库 我给出如下代码 来 现实 当前库的 所有表!                 for (int i = 0; i < 10; i++)
                     {
                         comm.CommandText = "select name from sysobjects where type = N'U' ";
                         SqlDataReader dar = comm.ExecuteReader();
                         if (dar.Read())
                         {
                             ss = (string)dar.GetValue(0);
                             MessageBox.Show(ss);
                             
                             dar.Dispose();
                             continue;
                         }
                 }
                 
      

  2.   

    ..............你的意思 我明白 但是 你需要明白的是    sqlserver中  **的永远都只是表! 而不是 数据库 我给出如下代码 来 现实 当前库的 所有表!                 for (int i = 0; i < 10; i++)
                     {
                         comm.CommandText = "select name from sysobjects where type = N'U' ";
                         SqlDataReader dar = comm.ExecuteReader();
                         if (dar.Read())
                         {
                             ss = (string)dar.GetValue(0);
                             MessageBox.Show(ss);
                             
                             dar.Dispose();
                             continue;
                         }
                 }
                 
      

  3.   

    ..............你的意思 我明白 但是 你需要明白的是    sqlserver中  caozuo的永远都只是表! 而不是 数据库 我给出如下代码 来 现实 当前库的 所有表!                 for (int i = 0; i < 10; i++)
                     {
                         comm.CommandText = "select name from sysobjects where type = N'U' ";
                         SqlDataReader dar = comm.ExecuteReader();
                         if (dar.Read())
                         {
                             ss = (string)dar.GetValue(0);
                             MessageBox.Show(ss);
                             
                             dar.Dispose();
                             continue;
                         }
                 }
                 
      

  4.   

    有谁知道怎么移动图片吗 就几张图片从右往左 用winform 
      

  5.   

            int j = 600;
            private void timer2_Tick(object sender, EventArgs e)
            {            this.panel1.Location = new System.Drawing.Point(j, 6); 
                j--;
                if (j < -600)
                {
                    j = 600;
                }
            }
    把图片放在panel1 搞定 
      

  6.   

            int j = 600;
            private void timer2_Tick(object sender, EventArgs e)
            {            this.panel1.Location = new System.Drawing.Point(j, 6); 
                //this.panel2.l
                j--;
                if (j < -600)
                {
                    j = 600;
                }
            }
    把图片放在panel1上搞定