Strongly Typed Datasets and Portability

  • Thread starter Steven Livingstone
  • Start date
S

Steven Livingstone

Hi all - i was asked a good question about strongly typed datasets the other
day and other than having used them generally i haven't gone into great
detail on how they work under the covers. I'd appreciate any replies,
suggestions and/or pointers to help me understand the following scenario.

If i am correct you will use strong typed dataset's (unfortunate anacronym
from that!) to allow developers to code a class against well defined CLR (or
custom) types to they can get design time type checking based on the schema
of their database. This works great for SQL Server for example.

Now, when happens if at run time, one of those strongly typed datasets is
not supported by the database you are working against (say you changed it to
Sybase or something!). So your strongly typed dataset worked great at design
time, but at runtime you suddenly have this problem where a client is having
problems with their application due to the database they are working against
having changed. Is this a problem or am i missing something? What at the
limitatations on such datasets etc? I am reading through doco just now to
understand it better, but would appreciate any additional explanations from
those who have experience with them in practice.

best egards,
Steven
 
G

Gavin Joyce

Hi,

The DataSet is disconnected from the database, and if you define all your
data access code in a Data Access Object this allows a decoupling from the
database. If you did decide to change database platforms, you would only
need to rewrite the data access code in the DAO classes, and your client
code would not need to be modified.

Thanks,
Gavin

--
===================================
nTierGen.NET Framework Generator 1.3
http://www.nTierGen.NET/

Generates Stored Procedures, Data Access Code, Business Rules Layer,
Stongly-Typed DataSets, Web Services
===================================
 
G

Gavin Joyce

Hi,

If your underlying database schema changes, you will need to regenerate the
Strongly-Typed DataSets and Data Access Code. If you use a tool
(http://www.nTierGen.NET) you will save yourself the hassle.

Thanks,
Gavin Joyce

--
___________________________________________________________
nTierGen.NET Code Generator - http://www.nTierGen.NET/

Stored Procedures (Get, GetPaged, Insert, Update, Delete)
Data Access Layer - C#
Business Rules Layer - C# & VB.NET
Strongly-Typed DataSets - C#
Web Services - C#
___________________________________________________________
 

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

Top