A
ary
Hi,
If I use a datatable in conjuction with a sql datareader, would this
still be faster in performance than using a dataset?
If so why?
my Sourcecode like this :
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
thanks.
If I use a datatable in conjuction with a sql datareader, would this
still be faster in performance than using a dataset?
If so why?
my Sourcecode like this :
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
thanks.