I heard there is some trick to referencing statics in C# CLR stored procedure without having to mark the assembly as unsafe. Does anyone know this? This is usefull as the case of needing a little static shared variable here and there without having t - CSharp
This is a discussion on I heard there is some trick to referencing statics in C# CLR stored procedure without having to mark the assembly as unsafe. Does anyone know this? This is usefull as the case of needing a little static shared variable here and there without having t - CSharp ; I heard there is some trick to referencing statics in C# CLR stored
procedure without having to mark the assembly as unsafe. Does anyone know
this? This is usefull as the case of needing a little static shared variable
here ...

- Forum
- Software Development
- Programming Languages
- CSharp
- I heard there is some trick to referencing statics in C# CLR stored procedure without having to mark the assembly as unsafe. Does anyone know this? This is usefull as the case of needing a little static shared variable here and there without having t
-
I heard there is some trick to referencing statics in C# CLR stored procedure without having to mark the assembly as unsafe. Does anyone know this? This is usefull as the case of needing a little static shared variable here and there without having t
I heard there is some trick to referencing statics in C# CLR stored
procedure without having to mark the assembly as unsafe. Does anyone know
this? This is usefull as the case of needing a little static shared variable
here and there without having to compromise safety in the Sql Server 2005.
-
Re: I heard there is some trick to referencing statics in C# CLR stored procedure without having to mark the assembly as unsafe. Does anyone know this? This is usefull as the case of needing a little static shared variable here and there without havi
"DR" <softwareengineer98037@yahoo.com> wrote in message
news:eUZq30mGIHA.1548@TK2MSFTNGP05.phx.gbl...
>I heard there is some trick to referencing statics in C# CLR stored
>procedure without having to mark the assembly as unsafe. Does anyone know
>this? This is usefull as the case of needing a little static shared
>variable here and there without having to compromise safety in the Sql
>Server 2005.
>
Never heard of such "trick", anyway, if such trick would exist, it would
compromise SQL Server's safety, also it makes little sense to rely on
statics in this environment, the statics will get re-initialized after an AD
reload. Your best bet is to save shared values in the database.
Willy.
-
Re: I heard there is some trick to referencing statics in C# CLR stored procedure without having to mark the assembly as unsafe. Does anyone know this? This is usefull as the case of needing a little static shared variable here and there without havi
shared values in db is not acceptable when i need to store then in a memory
resident hash table with no extra fat.
"Willy Denoyette [MVP]" <willy.denoyette@telenet.be> wrote in message
news:O5E8xUnGIHA.2328@TK2MSFTNGP03.phx.gbl...
> "DR" <softwareengineer98037@yahoo.com> wrote in message
> news:eUZq30mGIHA.1548@TK2MSFTNGP05.phx.gbl...
>>I heard there is some trick to referencing statics in C# CLR stored
>>procedure without having to mark the assembly as unsafe. Does anyone know
>>this? This is usefull as the case of needing a little static shared
>>variable here and there without having to compromise safety in the Sql
>>Server 2005.
>>
>
> Never heard of such "trick", anyway, if such trick would exist, it would
> compromise SQL Server's safety, also it makes little sense to rely on
> statics in this environment, the statics will get re-initialized after an
> AD reload. Your best bet is to save shared values in the database.
>
> Willy.
>
>
-
Re: I heard there is some trick to referencing statics in C# CLR stored procedure without having to mark the assembly as unsafe. Does anyone know this? This is usefull as the case of needing a little static shared variable here and there without havi
What kind of value do you need to store? A value in the database might
be the only option here. If you want to reduce the overhead of having to
query the database from inside the CLR stored procedure, do the query for
the value outside of the CLR stored procedure (in a wrapper) and then pass
your static value in (perhaps make it an output variable if the value needs
to be set).
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
"DR" <softwareengineer98037@yahoo.com> wrote in message
news:O8o2qDoGIHA.1212@TK2MSFTNGP05.phx.gbl...
> shared values in db is not acceptable when i need to store then in a
> memory resident hash table with no extra fat.
>
> "Willy Denoyette [MVP]" <willy.denoyette@telenet.be> wrote in message
> news:O5E8xUnGIHA.2328@TK2MSFTNGP03.phx.gbl...
>> "DR" <softwareengineer98037@yahoo.com> wrote in message
>> news:eUZq30mGIHA.1548@TK2MSFTNGP05.phx.gbl...
>>>I heard there is some trick to referencing statics in C# CLR stored
>>>procedure without having to mark the assembly as unsafe. Does anyone know
>>>this? This is usefull as the case of needing a little static shared
>>>variable here and there without having to compromise safety in the Sql
>>>Server 2005.
>>>
>>
>> Never heard of such "trick", anyway, if such trick would exist, it would
>> compromise SQL Server's safety, also it makes little sense to rely on
>> statics in this environment, the statics will get re-initialized after an
>> AD reload. Your best bet is to save shared values in the database.
>>
>> Willy.
>>
>>
>
>
Similar Threads
-
By Application Development in forum ADO DAO RDO RDS
Replies: 3
Last Post: 11-08-2007, 01:34 PM
-
By Application Development in forum CSharp
Replies: 1
Last Post: 11-06-2007, 09:50 PM
-
By Application Development in forum DOTNET
Replies: 1
Last Post: 10-30-2007, 06:25 AM
-
By Application Development in forum DOTNET
Replies: 0
Last Post: 10-29-2007, 03:48 PM
-
By Application Development in forum ADO DAO RDO RDS
Replies: 0
Last Post: 10-29-2007, 03:48 PM