DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Tue, 21 Aug 2007 03:21:47 -0700,    posted on: microsoft.public.dotnet.framework.aspnet        back       

Thread Index
  1    ary
          2    Kevin Spencer
                 3    Braulio Diez
                 4    Kevin Spencer
          5    ary
          6    ary


SqlDatareader & Datatable vs Dataset   
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.
Date:Tue, 21 Aug 2007 03:21:47 -0700   Author:  

Re: SqlDatareader & Datatable vs Dataset   
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

"ary"  wrote in message 
news:1187691707.889717.256070@w3g2000hsg.googlegroups.com...

> 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.
> 
Date:Tue, 21 Aug 2007 07:18:10 -0400   Author:  

Re: SqlDatareader & Datatable vs Dataset   
On Aug 21, 2:18 pm, "Kevin Spencer"  wrote:

> 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
>
> "ary"  wrote in message
>
> news:1187691707.889717.256070@w3g2000hsg.googlegroups.com...
>
>
>
> > 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.- Hide quoted text -
>
> - Show quoted text -


You Don't Right My Question Because My Question not correct i correct
it.
Date:Tue, 21 Aug 2007 04:52:39 -0700   Author:  

Re: SqlDatareader & Datatable vs Dataset   
On Aug 21, 2:18 pm, "Kevin Spencer"  wrote:

> 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
>
> "ary"  wrote in message
>
> news:1187691707.889717.256070@w3g2000hsg.googlegroups.com...
>
>
>
> > 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.- Hide quoted text -
>
> - Show quoted text -


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

thanks for replay
Date:Tue, 21 Aug 2007 04:55:12 -0700   Author:  

Re: SqlDatareader & Datatable vs Dataset   
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
/// ------------------------------




"ary" wrote:


> On Aug 21, 2:18 pm, "Kevin Spencer"  wrote:
> > 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
> >
> > "ary"  wrote in message
> >
> > news:1187691707.889717.256070@w3g2000hsg.googlegroups.com...
> >
> >
> >
> > > 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.- Hide quoted text -
> >
> > - Show quoted text -
> 
> You Don't Right My Question Because My Question not correct i correct
> it.
> 
> 
> 
Date:Tue, 21 Aug 2007 09:14:03 -0700   Author:  

Re: SqlDatareader & Datatable vs Dataset   
In that case, correct it in the original thread.

-- 
HTH,

Kevin Spencer
Microsoft MVP

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

"ary"  wrote in message 
news:1187697312.074769.132220@r34g2000hsd.googlegroups.com...

> On Aug 21, 2:18 pm, "Kevin Spencer"  wrote:
>> 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
>>
>> "ary"  wrote in message
>>
>> news:1187691707.889717.256070@w3g2000hsg.googlegroups.com...
>>
>>
>>
>> > 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.- Hide quoted text -
>>
>> - Show quoted text -
>
> You Don't understand Right  MY Question Because My Questionwas not
> correct, I correct it.
>
> thanks for replay
> 
Date:Wed, 22 Aug 2007 07:07:51 -0400   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us