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: Wed, 8 Aug 2007 12:33:13 -0600,    posted on: microsoft.public.dotnet.framework.adonet        back       

Thread Index
  1    Siegfried Heintze
          2    William Vaughn


Strongly Typed DateSets/DataTables and DataReaders   
As I recall, data readers are much more efficient than DataAdapters.

Unfortunately, the code I am refactoring could really benefit from a VS 
generated strongly bound DataRow but it is using a data reader. Is there a 
way to make VS 2003 generate a strongly typed DataRow, DataTable or DataSet 
that can be easily used with a DataReader? Actually all I really want is a 
automatically generated strongly typed DataRow (based on a SQL query) that 
can populate itself from a DataReader.

How can I do that?

Thanks,
Siegfried
Date:Wed, 8 Aug 2007 12:33:13 -0600   Author:  

Re: Strongly Typed DateSets/DataTables and DataReaders   
Ah, that's like saying a motor is less efficient than the electrical cord 
used to run it.
The DataReader is the low-level mechanism used by the DataAdapter Fill 
method to populate the DataTable(s).
Try to run a query that returns a single row (TOP 1) via a DataReader and 
use the DataTable.Load to populate the DataRow from the DataReader.
-- 
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------

"Siegfried Heintze"  wrote in message 
news:%23gzbVqe2HHA.5116@TK2MSFTNGP04.phx.gbl...

> As I recall, data readers are much more efficient than DataAdapters.
>
> Unfortunately, the code I am refactoring could really benefit from a VS 
> generated strongly bound DataRow but it is using a data reader. Is there a 
> way to make VS 2003 generate a strongly typed DataRow, DataTable or 
> DataSet that can be easily used with a DataReader? Actually all I really 
> want is a automatically generated strongly typed DataRow (based on a SQL 
> query) that can populate itself from a DataReader.
>
> How can I do that?
>
> Thanks,
> Siegfried
> 
Date:Wed, 8 Aug 2007 15:19:24 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


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