I created a SVF using VB.Net and I had my function declared like this:<br /><br /><i><Microsoft.SqlServer.Server.SqlFunction(IsDeterministic:=True, IsPrecise:=True)> _<br /> Public Shared Function MyFunction(ByVal intCodeItem As Int32) As SqlString<br /><br /><some codes><br />Return New SqlString(<somevalue><img src='/community/emoticons/emotion-5.gif' alt='' /><br />End Function</i><br /><br />And i got this error message: System.InvalidOperationException: 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.<br /><br />I retrieve data inside the function using a datareader, manipulate the result set and return a string.<br /><br />Any help is appreciated.