views:

226

answers:

1

First off happy new year guys.

I have a small but significant query. I'll give a similiar use case but simplified, it does however cover my question.

Let's User A connects to the SQL Server 2000 database and we get a connection from the pool.

User A sets dateformat DMY. Finishes and the connections is released back to the pool.

User B comes along, connects with the same string and gets the same connection from the pool, sets the dateformat MDY, finished and returns the connection.

User A reconnects and gets the same connection, what is the dateformat ?

Is it re initialised on returning to the pool? Do the connections retain there settings? When the connection is removed from the pool where does a new connection take it's initial settings?

A: 

If you didn't program the pooling mechanism yourself. Its more likely that the connection goes back to its initial state before going into the pool. Moreover, there will be a configuration option where programmers can define or customize the behavior of the connection and the pool. And that is where the new connection gets its setting from. Otherwise, there must be a default settings given by the provider.

Adeel Ansari
It has been my experience that the connection maintains its session settings however on deep deep study it turns out it depends on the MDAC version and some other settings. It's just basically a minefield of information and it never directly relates to yourself when you hunt it down :). PITA!
Robert