.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

UnTyped DataSets and Strongly Type DataSets

Posted By: Venkat     Posted Date: March 02, 2010    Points: 2   Category :ADO.Net
We all are use datasets as a means of carrier of data from one layer to another. Most of the time we are using weakly typed datasets. In this article I will explain the differences between weakly typed datasets and strongly type datasets

View Complete Post

More Related Resource Links

Problems with AND/OR in SQL query in strongly type datasets



In my ASP.NET web application I am using strongly typed datasets for data access. In my dataset.xsd class I have added an SQL query that works in SQL Management Studio, and when executed in the Table Adapter Query Configuration Wizard --> Execute Query form. But when invoked from the application using the autogenerated table adapter it returns no hits.

INNER JOIN Department ON Department.Dep_Id = Device.Dev_Dep_id 
INNER JOIN Customer ON Customer.Cus_Id = Department.Dep_CustomerNr 
INNER JOIN RootCustomer ON RootCustomer.RCus_Id = Customer.RCus_Id
(RootCustomer.RCus_Id = @CustomerId) AND (Device.Dev_Status = 10) AND (Device.Dev_serial LIKE '%' + @searchPattern + '%') OR
(RootCustomer.RCus_Id = @CustomerId) AND (Device.Dev_Status = 10) AND (Device.Dev_CustMark LIKE '%' + @searchPattern + '%') OR
(RootCustomer.RCus_Id = @CustomerId) AND (Device.Dev_Status = 10) AND (Device.Dev_IpAddress LIKE '%' + @searchPattern + '%') OR
(RootCustomer.RCus_Id = @CustomerId) AND (Device.Dev_Status = 10) AND (Device.Dev_ArticleNr LIKE '%' + @searchPattern + '%') OR
(RootCustomer.RCus_Id = @CustomerId) AND (Device.Dev_Status = 10) AND (Device.Dev_Descr LIKE '%' + @searchPattern + '%')
ORDER BY Device.Dev_serial

What possib

Data Points: Efficient Coding With Strongly Typed DataSets


Someone once said to me that the hallmark of a good developer is the desire to spend time efficiently. Developers are continually pursuing ways to make coding easier and faster, and to reduce the number of errors.

John Papa

MSDN Magazine December 2004

How to create strongly typed datasets with access parameter queries



How can you create strongly typed datasets using an access database against access select statements that use parameters?

The problem is VS.Net doesn't allow select queries with parameters to be dragged onto a form, it only allows access queries without parameters!

I also tried the dataadapter wizard, but again it only allows me to select queries without parameters?

Many thanks in advance


Problem with SCOPE_IDENTITY in strongly typed datasets



I am developing an ASP.NET site and I am using strongly typed datasets and I am generating them automatically in Visual Studio 2008. I have been using TransactionScope to be able to use several table adapters from different datasets and update them in one transaction. When I create a new row, I use the update method in the table adapter to create new posts. The update method takes a dataset, datatable or a row as argument making them very easy to work with. After I have updated a row, I have generated a ExecuteScalarGetIdValue() call to get the latest inserted ID value. I use "SELECT SCOPE_IDENTITY" and it gives me an exception. When I try the query builder this SELECT SCOPE_IDENTITY is returning NULL. When I ask it in SQL Management Studio SQL Query window it returns a correct value. How can I get the correct value from the table adapter?

        id = this._event.ExecuteScalarGetIdValue();



      return true;

 Best regards, Janhe

Autogenerated strongly typed datasets: change database



I have a data access layer in my application where I put all my *.xsd files (strongly typed datasets) that are autogenerated using Visual Studio 2010.

To be able to change target database I do the following manually in Visual Studio. Then I recompile and publish to web server.


1. Change database namn in connectionstring in Settings file under Properties in my DAL class library.

2. Find and replace database namn in all occureances of "DbObjectName="DBNAME.dbo.".

3. Find and replace database namn in all occureances of "DataSourceName="DBNAME.dbo.".


This seems to work but is not an optimal procedure so my question is:

There must be a better way, can I do this programmatically?


Best regards, Janhe

Generate strongly typed datasets from xml


I am following an articles about strongly typed datasets in vs.net. After creating my xml file and creating the schema file, when I right click to "generate dataset, that option is not available in Visual Studio 2005. How do I do this?


Typed DataSets in .NET

we can specify the data type when we create a DataColumn for a DataTable. This is to enforce the runtime type-safety for the column so that only data of specified data type can be stored in the column

Cutting Edge: DataSets vs. Collections


In software, five years is like a geological era. Five years ago, the Microsoft® . NET Framework had just been announced. Since then, the DataSet has emerged as the key object for performing a variety of data-related tasks in .

Dino Esposito

MSDN Magazine August 2005

Cutting Edge: Binary Serialization of DataSets


The ADO. NET DataSet object plays an essential role in most of today's distributed, multitiered applications. Instances of the DataSet class are used to move data across the tiers and to exchange data with external services.

Dino Esposito

MSDN Magazine October 2004

The XML Files: Web Services and DataSets


Programmers using Visual Basic® 6. 0 have long bowed to the altar of the ADO recordset. It's probably the most commonly used data structure in Windows®-based applications today. The ADO. NET DataSet is poised to play a similar role in the realm of managed Windows-based applications.

Aaron Skonnard

MSDN Magazine April 2003

Typed DataSets/Connection Pooling


 Hey all,

I've got an ASP.net application that has about 100-120 sites connecting to punch in/out in the beg of shift, lunch, and end of shift. I've found that the app gets slow/non-responsive during peak times. Also, I'm noticing that the app will throw Oracle End of File Communication errors periodically during the day. I'm using Strongly typed Datasets to interact with the DB. I have a couple of questions:

1. What type of cleanup should I be performing? Should I be closing/disposing the connection or Adapter instance or is this handled internally by the dataSet?

2. I have the connection pooling set to the default - 100. Should I increase this or will this cause other performance issues? How would one test to see if the connection pool is maxing out? Could this be causing the Oracle EOF (ORA-03113) errors?


pass parameter between datasets



I've a user table, and contact table linked to it, and appointments where contact are linked to it with users in this in it.

I need a report which show ...by user number of contact created by this user and number of appointment created

so i guess i need two datasets but how can I pass parameters between them to know what is the current user id ..?

thanks so much  

asp.net insert into 3 related tables using three tier architecture and typed datasets

I am using ASP.NET (C# and sql server express 2005) for my web application project. I have three related tables.I want to do an insert using typed datasets,tableadapters and three tier architecture.I wish to know how to do simultaneous inserts in 3 tables.So i wish to insert a row in first table and get its primary key.Same with the second table.I will use the primary keys of those first two tables to do the insert in the third table.How can i accomplish this using formview control and what methods should i use??Please give me suggestions.thanks in advance for reading this. I really appreciate it.

manage with two datasets - Who like tricky query ???

I've a big issue I don't know how to manage this with report builder 2.0 I've four table. - SystemUser (systemUserId) - FilteredContact (onwerid, owneridname, contactid, lastname..) - FilteredAppointment (ownerid, stateCode, Subject, ActivityId, CreatedBy, OwnerIdName..) - FilteredActivityParty (ActivityId, PartyId, participationTypeMask...) So basicly the user can create contact, so it becomes the owner of the contact. And user can create appointments, but need to choose a contact as required to the appointment. This contact can be created by the current user or not. So FilteredContact.contactID = FilteredActivityParty.partyId , as a contact is in a list of activityParty. FilteredAppointment.activityId = FilteredActivityParty.activityId So FilteredSystemUser.systemUserId = FilteredContact.ownerId FilteredAppointment.activity.ownerId = FilteredContact.contactId   With all that, I need to get by FilteredSystemUser.systemUserId, the amount of FilteredContact that Im the owner and I need to know how many people(partyid) where Filteredappointment.ownerId=Filteredsystemuser.systemuserid. And I cant find a way to manage this without two datasets. I've no idea how to link thus two datasets between them. Thanks for your help

Multiple DataSets in One Page

Hi, I'm using SSRS 2005. I'm working on a SSRS that has three data set: one for client information display, the other for chart (graph) and third for Report Parameter to select Clients Name. Clients can have one of more facilities. The issue I'm running into is that when a user selects a client from the parameter, I get multiple facilities info for the client selected and and one Graph at the end. For example, if I have client ABC and client ABC has 3 facilities: Fac1, Fac2 and Fac3. The info for each facilities is displayed, but only one Graph is displayed at the end of the page; I understand this is because I'm using a List to display the info using a separate Dataset and a separate dataset for the chart. My question is there a way that facilities information and chart can be displaced on one page? For example, Fac1 information and the chart associated with it on one page and next page would be Fac2's info and chart and so on.

SSRS 2008 R2 Datasets

Hi, We recently upgraded to SSRS 2008 R2.  Many of my reports were created with SSRS 2005.  I was wondering where my datasets went?  The reports have all the data, but I can't find the information for the datasets anywhere (for changing t-sql queries)! Thanks, AyaI hear and I forget. I see and I remember. I do and I understand.

Does SQL Server 2008 R2 Express Reporting Service support Shared Datasets?

I have spent a few hours trying to get this to work. I am using Report Builder 3.0 (locally), with SQL Server 2008 R2 Express Edition on a remote web server. I am running Report Builder as an Admin under Win7 64bit. All is OK until I attempt a Save of a newly created shared dataset. The error message is: Failed to save dataset "mydataset.rsd" The feature "Shared dataset" is not supported in this edition of Reporting Services. Details: The feature: "Shared dataset" is not supported in this edition of Reporting Services. ---> Microsoft.ReportingServices.Diagnostics.Utilities.OperationNotSupportedException: The feature: "Shared dataset" is not supported in this edition of Reporting Services. I have researched the web, and the list of features for Express Edition does not list this feature as not being supported, although it does list "Shared component library" as being missing. Could anyone please confirm the situation please. If it is  a bug, is there any fix or workaround?  John Walton  
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend