Welcome to .NET...
First, I would toss out what you know about VB6 and ADO classic as both
VB.NET and ADO.NET are very different. The DataReader is the "pipe" or
stream of resultsets connected to the data source via a Connection. It's
used by the TableAdapter or (obsolete) DataAdapter Fill methods. There are
no "Recordsets" or cursors in ADO.NET--just disconnected rowsets. Yes, the
DataTable is the mechanism used to manage data once fetched via a Command
execute call.
Can you use DataTables in the same was as Recordsets against middle-tier
components? No, not really--not if they're designed to extrude or accept
Recordsets. Yes, it might make sense to put all of the data access
components into a single model or better yet, into an object library as
discussed in Rocky Lhotka's books.
I expect my book (which is written specifically for developers starting out
with .NET) would also help.
--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
http://betav.com/blog/billva
http://betav.com
____________________________________________________________________________________________
"jamesfreddyc" <(E-Mail Removed)> wrote in message
news:3CD6AC2B-174E-4664-A99B-(E-Mail Removed)...
> New to VB.NET and need a bit of advice for re-writing all VB6 apps in
> VS2008/VB.NET --- any replies are greatly appreciated.
>
> Previous app design included DataAccess (SQLServer/Sprocs) by individual
> Classes "mapped" to the individual SProcs on SQLServer 2005 db. For ex,
>
> "SRCustomers" is a StoredProc (Solely a SELECT with 4 INNER JOINS,
> recieved
> 2 parameters)
>
> and...
>
> "rsSRCustomers" is A ClassModule for creating recordset
> (Public WithEvents rsSRCustomers as ADODB.Recordset)
> So, it was very easy to create/destroy this rs throughout the entire
> application.
>
> From what I can tell, I am inclined to go with an SQLDataReader (for now,
> I
> just need to create SELECTS).
>
> Questions:
>
> 1. I was using those ADOrecordsets for use in other libraries (ArcObjects
> for creating spatial data layers/shapefiles). So, can I use DataTables in
> the same manner as an ADOrecordset?
>
> 2. How do I implement a logical approach to building on Module as a
> DataAccessLayer? Ideally, I'd like to put all of the various data access
> proc's in one Module. Is this a good approach? Alternatives?
>
>
> Thanks,
>
> j
>
>