Sunday, March 25, 2012

Accessing database from User Defined Aggregate

Hi,
I am trying to access the database (using SqlConnection and then SQLCommand)
from within an CLR User Defined Aggregate, but SQL 2005 always return that
"Data access is not allowed in this context".
Anybody knows how can I do this?
Thanks,
FernandoAFAIK, you cannot do this.
What is your need to do this?
--
HTH,
SriSamp
Email: srisamp@.gmail.com
Blog: http://blogs.sqlxml.org/srinivassampath
URL: http://www32.brinkster.com/srisamp
"Fernando" <Fernando@.discussions.microsoft.com> wrote in message
news:6025EC30-71C4-4BD7-B96C-FE62C98A33D9@.microsoft.com...
> Hi,
> I am trying to access the database (using SqlConnection and then
> SQLCommand)
> from within an CLR User Defined Aggregate, but SQL 2005 always return that
> "Data access is not allowed in this context".
> Anybody knows how can I do this?
> Thanks,
> Fernando|||SriSamp,
Thanks for your response. While doing aggregation I may need to access
additional data for computing my calculation.
It is not a trivial aggregations (sum, avg, etc.). This is specific for some
statistics calculation for non-linear equations.
Thanks,
Custodio
"SriSamp" wrote:
> AFAIK, you cannot do this.
> What is your need to do this?
> --
> HTH,
> SriSamp
> Email: srisamp@.gmail.com
> Blog: http://blogs.sqlxml.org/srinivassampath
> URL: http://www32.brinkster.com/srisamp
> "Fernando" <Fernando@.discussions.microsoft.com> wrote in message
> news:6025EC30-71C4-4BD7-B96C-FE62C98A33D9@.microsoft.com...

No comments:

Post a Comment