Datable 的 clone 方法....


static public DataTable Get_Table(string table_road,string Schema)
        
{
            DataSet ds
=new DataSet (); 
            ds.ReadXmlSchema(Schema);
            ds.ReadXml (table_road,System.Data .XmlReadMode .ReadSchema);
            DataTable dt
=ds.Tables[0];
            DataRow[] drs
=dt.Select ("","id DESC");
        DataTable dt1
=new DataTable ();
            dt1
=dt.Clone(); //不加这句试试
            foreach(DataRow dr in drs)
            
{
                dt1.ImportRow (dr);

            }

            
            
            
return  dt1 ;


        }
Datable 的 clone 方法....

posted on 2005-04-11 10:13  gwazy  阅读(553)  评论(0编辑  收藏  举报

导航