-
ADO.net verbose ?
I see everywhere that ADO.net is less consumming bandwidth than ADO. It's
the first reason to more to it.
Well, OK, why not, but I did some test and it didn't seems really less
verbose.
I put an Access base in a computer.
On my server, I make a DSN connection.
I Launch Network Monitor.
Then, I try 2 thing :
First, reading a ADO Recordset (ForwordOnly) and a ADO.net DataReader -->
nearly same octets
Second, always updating 20 records in the database.
In VB6, code was like this :
Dim rs As Recordset
Set rs = New Recordset
rs.Open "Select * From Personnes", "DSN=BDDFilles", adOpenKeyset,
adLockOptimistic
Do Until rs.EOF
rs.Fields("Temp") = rs.Fields("Temp") & "A"
rs.Update
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
In VB.net, it was :
Dim oDataSetComm As New ADO.ADODataSetCommand("Select * From Personnes",
"DSN=BDDFilles")
Dim ds As New DataSet(), dt As DataTable, dr As DataRow
oDataSetComm.FillDataSet(ds, "Personnes")
dt = ds.Tables(0)
For Each dr In dt.Rows
dr("Temp") = dr("Temp").ToString & "A"
Next
oDataSetComm.Update(ds, "Personnes")
oDataSetComm.Dispose()
Results :
Exchange with ADO are : 240 Ko
With ADO.net : 600 Ko !!!
Did I miss something ?
--
Richard Clark - rc@c2i.fr
______________________________________________
NOUVEAU : Liste de diffusion sur MS.NET
Inscription en envoyant un mail à :
----------------------------------------------
dotnetfrance-subscribe@yahoogroups.com
----------------------------------------------
http://www.c2i.fr - Le portail francophone
Visual Basic,VB.NET,ASP, ASP.NET
+ de 517 aides disponibles (15/02)
______________________________________________
-
Re: ADO.net verbose ?
As your question in "Microsoft.Public.Dotnet.Framework.Adonet". You are more
likely to get the attention of a MS person.
--
Jonathan Allen
"May you always take change in stride and never fear it."
"c2i - Richard Clark" <rc@c2i.fr> wrote in message
news:3aa8d6ec@news.devx.com...
> I see everywhere that ADO.net is less consumming bandwidth than ADO. It's
> the first reason to more to it.
>
> Well, OK, why not, but I did some test and it didn't seems really less
> verbose.
> I put an Access base in a computer.
> On my server, I make a DSN connection.
> I Launch Network Monitor.
> Then, I try 2 thing :
> First, reading a ADO Recordset (ForwordOnly) and a ADO.net DataReader -->
> nearly same octets
> Second, always updating 20 records in the database.
> In VB6, code was like this :
>
> Dim rs As Recordset
> Set rs = New Recordset
> rs.Open "Select * From Personnes", "DSN=BDDFilles", adOpenKeyset,
> adLockOptimistic
> Do Until rs.EOF
>
> rs.Fields("Temp") = rs.Fields("Temp") & "A"
> rs.Update
> rs.MoveNext
> Loop
> rs.Close
> Set rs = Nothing
>
> In VB.net, it was :
>
> Dim oDataSetComm As New ADO.ADODataSetCommand("Select * From Personnes",
> "DSN=BDDFilles")
> Dim ds As New DataSet(), dt As DataTable, dr As DataRow
> oDataSetComm.FillDataSet(ds, "Personnes")
> dt = ds.Tables(0)
> For Each dr In dt.Rows
> dr("Temp") = dr("Temp").ToString & "A"
> Next
> oDataSetComm.Update(ds, "Personnes")
> oDataSetComm.Dispose()
>
> Results :
> Exchange with ADO are : 240 Ko
> With ADO.net : 600 Ko !!!
>
> Did I miss something ?
>
>
> --
> Richard Clark - rc@c2i.fr
> ______________________________________________
> NOUVEAU : Liste de diffusion sur MS.NET
> Inscription en envoyant un mail à :
> ----------------------------------------------
> dotnetfrance-subscribe@yahoogroups.com
> ----------------------------------------------
> http://www.c2i.fr - Le portail francophone
> Visual Basic,VB.NET,ASP, ASP.NET
> + de 517 aides disponibles (15/02)
> ______________________________________________
>
>
-
Re: ADO.net verbose ?
Thank's, I'll put it in a second.
--
Richard Clark - rc@c2i.fr
______________________________________________
NOUVEAU : Liste de diffusion sur MS.NET
Inscription en envoyant un mail à :
----------------------------------------------
dotnetfrance-subscribe@yahoogroups.com
----------------------------------------------
http://www.c2i.fr - Le portail francophone
Visual Basic,VB.NET,ASP, ASP.NET
+ de 517 aides disponibles (15/02)
______________________________________________
"Jonathan Allen" <greywolf@cts.com> wrote in message
news:3aa932c6@news.devx.com...
> As your question in "Microsoft.Public.Dotnet.Framework.Adonet". You are
more
> likely to get the attention of a MS person.
>
> --
> Jonathan Allen
>
> "May you always take change in stride and never fear it."
>
> "c2i - Richard Clark" <rc@c2i.fr> wrote in message
> news:3aa8d6ec@news.devx.com...
> > I see everywhere that ADO.net is less consumming bandwidth than ADO.
It's
> > the first reason to more to it.
> >
> > Well, OK, why not, but I did some test and it didn't seems really less
> > verbose.
> > I put an Access base in a computer.
> > On my server, I make a DSN connection.
> > I Launch Network Monitor.
> > Then, I try 2 thing :
> > First, reading a ADO Recordset (ForwordOnly) and a ADO.net
DataReader -->
> > nearly same octets
> > Second, always updating 20 records in the database.
> > In VB6, code was like this :
> >
> > Dim rs As Recordset
> > Set rs = New Recordset
> > rs.Open "Select * From Personnes", "DSN=BDDFilles", adOpenKeyset,
> > adLockOptimistic
> > Do Until rs.EOF
> >
> > rs.Fields("Temp") = rs.Fields("Temp") & "A"
> > rs.Update
> > rs.MoveNext
> > Loop
> > rs.Close
> > Set rs = Nothing
> >
> > In VB.net, it was :
> >
> > Dim oDataSetComm As New ADO.ADODataSetCommand("Select * From Personnes",
> > "DSN=BDDFilles")
> > Dim ds As New DataSet(), dt As DataTable, dr As DataRow
> > oDataSetComm.FillDataSet(ds, "Personnes")
> > dt = ds.Tables(0)
> > For Each dr In dt.Rows
> > dr("Temp") = dr("Temp").ToString & "A"
> > Next
> > oDataSetComm.Update(ds, "Personnes")
> > oDataSetComm.Dispose()
> >
> > Results :
> > Exchange with ADO are : 240 Ko
> > With ADO.net : 600 Ko !!!
> >
> > Did I miss something ?
> >
> >
> > --
> > Richard Clark - rc@c2i.fr
> > ______________________________________________
> > NOUVEAU : Liste de diffusion sur MS.NET
> > Inscription en envoyant un mail à :
> > ----------------------------------------------
> > dotnetfrance-subscribe@yahoogroups.com
> > ----------------------------------------------
> > http://www.c2i.fr - Le portail francophone
> > Visual Basic,VB.NET,ASP, ASP.NET
> > + de 517 aides disponibles (15/02)
> > ______________________________________________
> >
> >
>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks