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

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

Typed DataSets/Connection Pooling

Posted By:      Posted Date: August 24, 2010    Points: 0   Category :ASP.Net

 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?


View Complete Post

More Related Resource Links

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

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

Connection Pooling To SQL Server

Hi Folks,

I'm a new SQL PFE and just encountered my first SharePoint installation at a customer site. (The first of many, I'm sure.) I ran some health checks on the SQL Server and noticed 600-700 user connections from the SharePoint account. The SharePoint admins and developers are novice to junior-level, and unfamiliar with connection pooling. I've never worked with SharePoint before and don't know what it's normal behavior is or how connections should be managed by SharePoint.

They indicated the SharePoint system is relatively new and only getting a small amount of use compared to what is expected soon.

SQL Server is handling the load well right now, but if the number of connections grows proportionally to the load, this will become a performance constraint.

1. Is this a normal number of connections for SharePoint?
2. If not, where can the SharePoint staff and myself find a thorough explanation of the principles of SharePoint connection pooling?

Thanks, JDL

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


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.

The client was unable to reuse a session with SPID 58, which had been reset for connection pooling.

HI I am getting the below error on - Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (Intel X86)   Apr  2 2010 15:53:02   Copyright (c) Microsoft Corporation  Standard Edition on Windows NT 6.0 <X64> (Build 6002: Service Pack 2) (WOW64)  ----------------------------------------------------------------------------------------------------------------------------------------------------------------- 2010-09-08 14:34:08.81 spid58      Error: 18056, Severity: 20, State: 29. 2010-09-08 14:34:08.81 spid58      The client was unable to reuse a session with SPID 58, which had been reset for connection pooling. The failure ID is 29.  This error may have been caused by an earlier operation failing. Check the error logs for failed operations immediately before this error message. ----------------------------------------------------------------------------------------------------------------------------------------------------------------- I restart the IIS server and SQL server since then until today I haven't face similar error. However, I want to understand the reason for it and how to avoid such errors in future. Thanks

How to use connection string and strongly-typed dataset which exists in another project ?



i have a winform application with huge strongly-typed dataSet. Now, i've decided to create a web edition of my application and i want to use strongly-typed typed dataSet which exists in my winform application. also it's tableAdapters create with the connection string settings which stored in my winforms app.config.

my problem is that how to use strongly-typed dataset of my winform app with new connection string which exists in my web app ?

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

Strongy typed datasets, tableadapters and transactions


I'm using a stronly typed dataset built with the Visual Studio dataset designer for a .Net 2.0 application (cannot move above 2.0 unfortunatly)

On a simple level my database has two tables, Persons and Addresses. An Address record has a foriegn key to a Person from the Persons table.

When a new Person is created an Address is also inserted for the Person, I'd like this to be in a single transaction that can be committed or rolledback using the tableadapters.

This approach seems very close: http://www.codeproject.com/KB/dotnet/transactionta.aspx

This method is failing when the dataset is set to Refresh records on Insert/Update, but I need this Refresh to pull the ScopeIdentity and update the dataset so I know the new ID of a created record in Persons or Addresses.

Any ideas?

Connection Pooling VS Steady Connection in Windows Service Application


Hi All,

We are developing a windows service application which queries the sql db every second. For now, we have enabled connection pooling and every time we open and close connection at every access. Since it is a windows service can I open connection at service startup and close the connection shutdown

Please let me know the right approach in this scenario.





connection pooling from C++


My boss asked me to take one of our existing applications, which is written in C++ and connects to MS SQL Server, and get it to use connection pooling. I am new to connection pooling but I understand the general concept.

I found a helpful article, Driver Manager Connection Pooling , that describes the functions that have to be called and how to call them in order for connection pooling to work. I found that the app already calls all of these functions correctly. I wrote my own small app that does the same and I cannot get connection pooling to work.

(I know that connection pooling is not working because I am looking at the incoming connections using SQL Server Profiler. The "EventSubClass" column of the "Audit Login" event is "1 - Nonpooled".)

What should I be doing differently to achieve connection pooling?

Here is the test code I am using:


	SQLHANDLE hdlConn1, hdlConn2;
	SQLRETURN retcode;
	SQLSMALLINT driver_out_length;
	SQLWCHAR *connString;
	connString =

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?


Connection pooling issue with microsoft enterprise library in mysql


I am using microsoft enterprise libarary to connect to mysql using mysql .net connector (latest version 6.2.3)

But i am facing a problem of too many connections and connection pool reached maximum limit issue.

As connection is disposed by enterprise library iteself so i dont close the connection anywhere.

So after two or three hours i found i have 100 mysql connections in sleep mode which are doing nothing and are not being reused from the code .

So i want to ask is there any issue with my code or is there any issue with mysql connector

please suggest me a solution so that i can rectify this issue as it is causing a lot of trouble to me.


Ajay Singh Beniwal

Different Workstation ID's and connection pooling



I would like to know if i set different workstation ids in my connection string i will still be able to benefit from connection pooling. Does the SQL server (2005) opens a new connection if in the conection string is specified a different workstation ID?

Introducing ADO.NET and the Typed DataSet

In reviewing the applications it seemed everything they were doing involved database reads, writes, and manipulation. The development staff had been reviewing the articles and code samples for ADO.NET. They had spent many years refining their existing ADO based infrastructure and perfecting their use of ADO

UnTyped DataSets and Strongly Type DataSets

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
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