Re: I set my database to trustworthy and deployed this clr stored proc as unsafe ok but when i run this it returns 1 each time. as if ival keeps getting set back to 0 each time i call this clr stored proc. How to fix so that ival keeps its current value ea
- From: "DR" <softwareengineer98037@xxxxxxxxx>
- Date: Tue, 13 Nov 2007 17:42:22 -0800
that would be a disk access not shared memory
"Ben Voigt [C++ MVP]" <rbv@xxxxxxxxxxxxx> wrote in message
news:%23AfhRoUJIHA.5208@xxxxxxxxxxxxxxxxxxxxxxx
"DR" <softwareengineer98037@xxxxxxxxx> wrote in message
news:%23ass8HoGIHA.4684@xxxxxxxxxxxxxxxxxxxxxxx
I set my database to trustworthy and deployed this clr stored proc as
unsafe ok but when i run this it returns 1 each time. as if ival keeps
getting set back to 0 each time i call this clr stored proc. How to fix so
that ival keeps its current value each time i execute this from sql
server?
Store it in the database, that's the only way to ensure it keeps its value
through restarts, etc.
public partial class UserDefinedFunctions
{
static long ival = 0;
[Microsoft.SqlServer.Server.SqlFunction]
public static long GetTimestampF()
{
return ++ival;
}
};
.
- Follow-Ups:
- References:
- Prev by Date: Re: I set my database to trustworthy and deployed this clr stored proc as unsafe ok but when i run this it returns 1 each time. as if ival keeps getting set back to 0 each time i call this clr stored proc. How to fix so that ival keeps its current value ea
- Next by Date: Re: easiest way to upload a C# class library to a SQL server 2005 and deploy as CLR function
- Previous by thread: Re: I set my database to trustworthy and deployed this clr stored proc as unsafe ok but when i run this it returns 1 each time. as if ival keeps getting set back to 0 each time i call this clr stored proc. How to fix so that ival keeps its current value ea
- Next by thread: Re: I set my database to trustworthy and deployed this clr stored proc as unsafe ok but when i run this it returns 1 each time. as if ival keeps getting set back to 0 each time i call this clr stored proc. How to fix so that ival keeps its current value ea
- Index(es):
Relevant Pages
|
Loading