dt.Load(dr)  //ADO.net 2.0


//non 2.0
dr.GetSchemaTable() 得到这个SchemaTable 后,自己手工转换:

。。。

            dtSchema = dr.GetSchemaTable()
            For i = 0 To dtSchema.Rows.Count - 1
                dtReturn.Columns.Add(dtSchema.Rows(i).Item(0))
            Next
            While dr.Read()
                drw = dtReturn.NewRow()
                For i = 0 To dr.FieldCount - 1
                    drw(i) = dr(i)
                Next
                dtReturn.Rows.Add(drw)
            End While

。。。

posted on 2009-10-07 16:30  qinghao  阅读(136)  评论(0编辑  收藏  举报

Copyright © 2009 qinghao Powered by: 博客园