A
ary
I use a dataread to read data with high performance From database ,
but I have some question about this .
I use datatable to insert datareader item into DataTable , Is this
Consistently Better that a data reader or not?
Dim ArticleTable As New Data.DataTable
ArticleTable.Columns.Add("ArticleID",
Type.GetType("System.Int32"))
ArticleTable.Columns.Add("ArticleTitle",
Type.GetType("System.String"))
ArticleTable.Columns.Add("ArticleBody",
Type.GetType("System.String"))
ArticleTable.Columns.Add("ArticleDateCreated",
Type.GetType("System.String"))
..
..
....
Dim reader As SqlDataReader = Command.ExecuteReader()
While reader.Read()
row = ArticleTable.NewRow()
row("ArticleID") = reader("ArticleID")
row("ArticleTitle") = reader("ArticleTitle")
row("ArticleBody") = reader("ArticleBody")
row("ArticleDateCreated") = (reader("ArticleDateCreated"))
ArticleTable.Rows.Add(row)
End While
What is Happend in dataset to make it slower than datareader?
but I have some question about this .
I use datatable to insert datareader item into DataTable , Is this
Consistently Better that a data reader or not?
Dim ArticleTable As New Data.DataTable
ArticleTable.Columns.Add("ArticleID",
Type.GetType("System.Int32"))
ArticleTable.Columns.Add("ArticleTitle",
Type.GetType("System.String"))
ArticleTable.Columns.Add("ArticleBody",
Type.GetType("System.String"))
ArticleTable.Columns.Add("ArticleDateCreated",
Type.GetType("System.String"))
..
..
....
Dim reader As SqlDataReader = Command.ExecuteReader()
While reader.Read()
row = ArticleTable.NewRow()
row("ArticleID") = reader("ArticleID")
row("ArticleTitle") = reader("ArticleTitle")
row("ArticleBody") = reader("ArticleBody")
row("ArticleDateCreated") = (reader("ArticleDateCreated"))
ArticleTable.Rows.Add(row)
End While
What is Happend in dataset to make it slower than datareader?