<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Bug in CommentBelongsToUser stored procedure ReportServer database in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/Bug-in-CommentBelongsToUser-stored-procedure-ReportServer/m-p/2640546#M24877</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="411836" data-lia-user-login="woptastic1" class="lia-mention lia-mention-user"&gt;woptastic1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Sadly,&amp;nbsp;SqlCommand&amp;nbsp;objects ignore any&amp;nbsp;SqlParameter&amp;nbsp;object in their&amp;nbsp;.Parameters&amp;nbsp;collection with a value of&amp;nbsp;null.In my opinion, this is by design.&lt;/P&gt;
&lt;P&gt;There are two solutions to this problem that I found.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;In our stored procedures, give a default value to each parameter, so from&amp;nbsp;@Parameter int&amp;nbsp;to&amp;nbsp;@Parameter int = NULL&amp;nbsp;(or some other default value as required).&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;In our code that generates the individual&amp;nbsp;SqlParameter&amp;nbsp;objects, assigning&amp;nbsp;DBNull.Value&amp;nbsp;instead of&amp;nbsp;null&amp;nbsp;where the intended value is a SQL&amp;nbsp;NULL&amp;nbsp;does the trick.&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;refer:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/19703653/stored-procedure-or-function-expects-parameter-which-is-not-supplied" target="_blank"&gt;https://stackoverflow.com/questions/19703653/stored-procedure-or-function-expects-parameter-which-is-not-supplied&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did I answer your question? Mark my post as a solution!&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Lucien&lt;/P&gt;</description>
    <pubDate>Fri, 15 Jul 2022 07:41:18 GMT</pubDate>
    <dc:creator>v-luwang-msft</dc:creator>
    <dc:date>2022-07-15T07:41:18Z</dc:date>
    <item>
      <title>Bug in CommentBelongsToUser stored procedure ReportServer database</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Bug-in-CommentBelongsToUser-stored-procedure-ReportServer/m-p/2634519#M24844</link>
      <description>&lt;P&gt;Have May 2022 installed using custom authentication, user can create comments but then if they try to delete a comment, error pops up stating An error has occurred. An error occurred within the report server database. This may be due to a connection failure, timeout or low disk condition within the database.&amp;nbsp; When reviewing RSPortal log file it adds in&amp;nbsp;System.Data.SqlClient.SqlException: Procedure or function 'CommentBelongsToUser' expects parameter '@UserSid', which was not supplied. Since this is custom authentication their is no&amp;nbsp;@UserSid. If I modify stored procedure to set a default of NULL to the&amp;nbsp;@UserSid parameter the issue is resolved, though this will likely get ovewrote on any SQL Server or Report Server patching. Would think this should be addressed&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 18:58:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Bug-in-CommentBelongsToUser-stored-procedure-ReportServer/m-p/2634519#M24844</guid>
      <dc:creator>woptastic1</dc:creator>
      <dc:date>2022-07-12T18:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in CommentBelongsToUser stored procedure ReportServer database</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Bug-in-CommentBelongsToUser-stored-procedure-ReportServer/m-p/2640546#M24877</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="411836" data-lia-user-login="woptastic1" class="lia-mention lia-mention-user"&gt;woptastic1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Sadly,&amp;nbsp;SqlCommand&amp;nbsp;objects ignore any&amp;nbsp;SqlParameter&amp;nbsp;object in their&amp;nbsp;.Parameters&amp;nbsp;collection with a value of&amp;nbsp;null.In my opinion, this is by design.&lt;/P&gt;
&lt;P&gt;There are two solutions to this problem that I found.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;In our stored procedures, give a default value to each parameter, so from&amp;nbsp;@Parameter int&amp;nbsp;to&amp;nbsp;@Parameter int = NULL&amp;nbsp;(or some other default value as required).&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;In our code that generates the individual&amp;nbsp;SqlParameter&amp;nbsp;objects, assigning&amp;nbsp;DBNull.Value&amp;nbsp;instead of&amp;nbsp;null&amp;nbsp;where the intended value is a SQL&amp;nbsp;NULL&amp;nbsp;does the trick.&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;refer:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/19703653/stored-procedure-or-function-expects-parameter-which-is-not-supplied" target="_blank"&gt;https://stackoverflow.com/questions/19703653/stored-procedure-or-function-expects-parameter-which-is-not-supplied&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did I answer your question? Mark my post as a solution!&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Lucien&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2022 07:41:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Bug-in-CommentBelongsToUser-stored-procedure-ReportServer/m-p/2640546#M24877</guid>
      <dc:creator>v-luwang-msft</dc:creator>
      <dc:date>2022-07-15T07:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in CommentBelongsToUser stored procedure ReportServer database</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Bug-in-CommentBelongsToUser-stored-procedure-ReportServer/m-p/2641248#M24881</link>
      <description>&lt;P&gt;Thanks, this is more or less what I ended up doing however this is Microsofts own stored procedure within their ReportServer database, so any changes to their schema have a high likelihood of being overwritten with updates. It's also their own code that is executing, just seems they didn't think through custom authentication all the way&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2022 11:35:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Bug-in-CommentBelongsToUser-stored-procedure-ReportServer/m-p/2641248#M24881</guid>
      <dc:creator>woptastic1</dc:creator>
      <dc:date>2022-07-15T11:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in CommentBelongsToUser stored procedure ReportServer database</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Bug-in-CommentBelongsToUser-stored-procedure-ReportServer/m-p/2644760#M24923</link>
      <description>&lt;P&gt;No, since I had already done that prior to posting. Since this is code being fired by Microsoft on deleting a comment from Power BI we can't modify it and since the stored procedure itself can be overwritten on upgrades it's not really a feasible solution&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 11:39:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Bug-in-CommentBelongsToUser-stored-procedure-ReportServer/m-p/2644760#M24923</guid>
      <dc:creator>woptastic1</dc:creator>
      <dc:date>2022-07-18T11:39:05Z</dc:date>
    </item>
  </channel>
</rss>

