SqlDatareader & Datatable vs Dataset

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.
 
K

Kevin Spencer

You already asked this question, and it was answered several times in the
original thread.

--
HTH,

Kevin Spencer
Microsoft MVP

DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
 
A

ary

You already asked this question, and it was answered several times in the
original thread.

--
HTH,

Kevin Spencer
Microsoft MVP

DSI PrintManager, Miradyne Component Libraries:http://www.miradyne.net












- Show quoted text -

You Don't Right My Question Because My Question not correct i correct
it.
 
A

ary

You already asked this question, and it was answered several times in the
original thread.

--
HTH,

Kevin Spencer
Microsoft MVP

DSI PrintManager, Miradyne Component Libraries:http://www.miradyne.net












- Show quoted text -

You Don't understand Right MY Question Because My Questionwas not
correct, I correct it.

thanks for replay
 
G

Guest

If you want speed up your application, I would rather think about using
custom collections an sqlDataReader.

But before getting into major complexities, Are you having so much
concurrent users that you need to use datareaders? Have you think about using
cache in your application?

HTH
Braulio

/// ------------------------------
/// Braulio Diez
///
/// http://www.tipsdotnet.com
/// ------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top