From: Max2006 on
Hi,

I am relying on @@SPID to create temporary data in my stored procedures.
The scope of temporary data is a single SQL Server session.

The technique is called Process-Keyed Tables and it is described here:
http://www.sommarskog.se/share_data.html#prockeyed

Is there any possibility to have the same @SPID for two instance of the same
TableAdapter class?

I am concern about connection pooling. If two instance of a TableAdapter get
the same @SPID the temporary data will be mixed and that won't be good!

Any help would be appreciated,
Max


From: William Vaughn (MVP) on
Unless you disable the setting, a subsequent connection does not inherit the
state of a previous owner of a pooled connection. While the state is
maintained until the connection is reused, before any other operations are
passed, the connection is "reset" to clear the state.

--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________



"Max2006" <alanalan1(a)newsgroup.nospam> wrote in message
news:E85E6195-8FE7-4705-B656-183FF731BBF4(a)microsoft.com...
> Hi,
>
> I am relying on @@SPID to create temporary data in my stored procedures.
> The scope of temporary data is a single SQL Server session.
>
> The technique is called Process-Keyed Tables and it is described here:
> http://www.sommarskog.se/share_data.html#prockeyed
>
> Is there any possibility to have the same @SPID for two instance of the
> same TableAdapter class?
>
> I am concern about connection pooling. If two instance of a TableAdapter
> get the same @SPID the temporary data will be mixed and that won't be
> good!
>
> Any help would be appreciated,
> Max
>
>
From: Max2006 on
Hi William,

Thank you for help.

What is the setting? I just want to know, so I won't become disable by
accident.

BTW, I am a fan of your Hitchhiker book series.

Thank again,
Ali



"William Vaughn (MVP)" <billva(a)NoSpamBetav.com> wrote in message
news:OFJKiTO7IHA.3512(a)TK2MSFTNGP03.phx.gbl...
> Unless you disable the setting, a subsequent connection does not inherit
> the state of a previous owner of a pooled connection. While the state is
> maintained until the connection is reused, before any other operations are
> passed, the connection is "reset" to clear the state.
>
> --
> __________________________________________________________________________
> William R. Vaughn
> President and Founder Beta V Corporation
> Author, Mentor, Dad, Grandpa
> Microsoft MVP
> (425) 556-9205 (Pacific time)
> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
> ____________________________________________________________________________________________
>
>
>
> "Max2006" <alanalan1(a)newsgroup.nospam> wrote in message
> news:E85E6195-8FE7-4705-B656-183FF731BBF4(a)microsoft.com...
>> Hi,
>>
>> I am relying on @@SPID to create temporary data in my stored procedures.
>> The scope of temporary data is a single SQL Server session.
>>
>> The technique is called Process-Keyed Tables and it is described here:
>> http://www.sommarskog.se/share_data.html#prockeyed
>>
>> Is there any possibility to have the same @SPID for two instance of the
>> same TableAdapter class?
>>
>> I am concern about connection pooling. If two instance of a TableAdapter
>> get the same @SPID the temporary data will be mixed and that won't be
>> good!
>>
>> Any help would be appreciated,
>> Max
>>
>>
From: William Vaughn (MVP) on
Check out the ConnectionReset=True key/value pair. It defaults to True.
Nope, don't touch this unless you want to let subsequent pooled connection
users lie in the dirty sheets slept on by earlier users.

See Chapter 9 of the 7th edition.

--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________



"Max2006" <alanalan1(a)newsgroup.nospam> wrote in message
news:7553AF1B-3FD3-4475-9C27-5BEFC5DF3E58(a)microsoft.com...
> Hi William,
>
> Thank you for help.
>
> What is the setting? I just want to know, so I won't become disable by
> accident.
>
> BTW, I am a fan of your Hitchhiker book series.
>
> Thank again,
> Ali
>
>
>
> "William Vaughn (MVP)" <billva(a)NoSpamBetav.com> wrote in message
> news:OFJKiTO7IHA.3512(a)TK2MSFTNGP03.phx.gbl...
>> Unless you disable the setting, a subsequent connection does not inherit
>> the state of a previous owner of a pooled connection. While the state is
>> maintained until the connection is reused, before any other operations
>> are passed, the connection is "reset" to clear the state.
>>
>> --
>> __________________________________________________________________________
>> William R. Vaughn
>> President and Founder Beta V Corporation
>> Author, Mentor, Dad, Grandpa
>> Microsoft MVP
>> (425) 556-9205 (Pacific time)
>> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
>> ____________________________________________________________________________________________
>>
>>
>>
>> "Max2006" <alanalan1(a)newsgroup.nospam> wrote in message
>> news:E85E6195-8FE7-4705-B656-183FF731BBF4(a)microsoft.com...
>>> Hi,
>>>
>>> I am relying on @@SPID to create temporary data in my stored procedures.
>>> The scope of temporary data is a single SQL Server session.
>>>
>>> The technique is called Process-Keyed Tables and it is described here:
>>> http://www.sommarskog.se/share_data.html#prockeyed
>>>
>>> Is there any possibility to have the same @SPID for two instance of the
>>> same TableAdapter class?
>>>
>>> I am concern about connection pooling. If two instance of a TableAdapter
>>> get the same @SPID the temporary data will be mixed and that won't be
>>> good!
>>>
>>> Any help would be appreciated,
>>> Max
>>>
>>>