Quantcast
Channel: R.NET
Viewing all articles
Browse latest Browse all 1634

New Post: Inside SQLCLR

$
0
0
I've implemented the HellowWorldFromR() method as well as several others but after I execute one from SQL Server one time and attempt a second execution, I get this error, presumably because I call Dispose():

Msg 6522, Level 16, State 2, Line 32
A .NET Framework error occurred during execution of user-defined routine or aggregate "OneSidedHypothesis":
System.InvalidOperationException: The single REngine instance has already been disposed of (i.e. shut down). Multiple engine restart is not possible.
System.InvalidOperationException:
at RDotNet.REngine.GetInstance(String dll, Boolean initialize, StartupParameter parameter, ICharacterDevice device)
at ProviderAnalysisCLR.OneSidedHypothesis(SqlDecimal PriorAverage, SqlDecimal Tau, SqlDecimal ProvMean, SqlDecimal ProvStdDev, SqlDecimal N)

How am I supposed to get around this? Clearly, the engine should be disposed and when I run this as a standard function from a Console app it works fine with repeated executions.

Viewing all articles
Browse latest Browse all 1634

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>