Billy Rogers
Billy Rogers

Reputation:

What is a strongly typed dataset?

What is a strongly typed dataset? (.net)

Upvotes: 8

Views: 4883

Answers (4)

Marc Gravell
Marc Gravell

Reputation: 1062530

It looks like DataSet has already been covered, but for completeness, note that in .NET 3.5 there are good alternatives for simple data access; in particular, things like LINQ to SQL. This has a similar objective, but retains a much purer simple OO model to your data classes.

Upvotes: 3

user11039
user11039

Reputation: 864

A dataset which is tightly to a specific table at compile time so you can access the columns of a table using actual column name instead of index.

Upvotes: 2

rslite
rslite

Reputation: 84663

A strongly typed dataset is one that has specific types for the tables and their columns.

You can say

EmployeeDataset ds = ...
EmployeeRow row = ds.Employees.Rows[0];
row.Name = "Joe";

instead of:

DataSet ds = ...
DataRow row = ds.Tables["Employees"].Rows[0];
row["Name"] = "Joe";

This helps because you catch mistakes in naming at compile time, rather than run time and also enforces types on columns.

Upvotes: 17

Rik
Rik

Reputation: 29243

Short answer: A dataset which is guaranteed (by the compiler) to hold a specific type.

Upvotes: 3

Related Questions