Error while accessing a function in .NET assembly on SQL Server 2008

  • Hello All,

    I am getting following problem while using .NET assembly on SQL Server 2008:

    Msg 6522, Level 16, State 1, Procedure checkBlock, Line 0

    A .NET Framework error occurred during execution of user-defined routine or aggregate "checkBlock":

    System.Exception: Data access is not allowed in this context. Either the context is a function or method not marked with DataAccessKind.Read or SystemDataAccessKind.Read, is a callback to obtain data from FillRow method of a Table Valued Function, or is a UDT validation method. Connection=Integrated Security=SSPI;Persist Security Info=True;Initial Catalog=<DBName>;Data Source= (local)

    System.Exception:

    at Microsoft.VisualBasic.ErrObject.Raise(Int32 Number, Object Source, Object Description, Object HelpFile, Object HelpContext)

    at LBSupp.Check.checkBlock(String strCommand)

    There is a stored procedure in the database that invokes the user defined function in database named "checkBlock".

    This function in turn calls up the function "checkBlock" defined in the .NET DLL "LBSupp".

    This same assembly is working on SQL Server 2005 but giving error on SQL Server 2008 while invoking the function defined in it.

    Could anyone please assist me to resolve this issue?

Viewing post 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply