By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,715 Members | 1,815 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,715 IT Pros & Developers. It's quick & easy.

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

P: n/a
DR
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?
public partial class UserDefinedFunctions
{
static long ival = 0;
[Microsoft.SqlServer.Server.SqlFunction]
public static long GetTimestampF()
{
return ++ival;
}
};
Oct 29 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.