Gemini Community Support Site

This Gemini community support site can be used to find solutions to product issues. You can log in using Open Id, Google Profile and even Facebook. Feel free to ask a question or browse FAQs and documentation. Product tour videos are also available along with how-to videos demonstrating key Gemini capabilities.




Adding a custom field

web-app

Hi,

I would like to add an new custom field to an existing project that already contains issues.

The custom field creation works fine but when I want to set its value for an existing issue, I get the following error message :

Unexpected row count: 3; expected: 1

        <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

        <b> Description: </b>An

unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

        <b> Exception Details: </b>NHibernate.AdoNet.TooManyRowsAffectedException: Unexpected row count: 3; expected: 1<br><br>

        <b>Source Error:</b> <br><br>

        <table bgcolor="#ffffcc" width="100%">
           <tbody><tr>
              <td>
                  <code>

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

              </td>
           </tr>
        </tbody></table>

        <br>

        <b>Stack Trace:</b> <br><br>

        <table bgcolor="#ffffcc" width="100%">
           <tbody><tr>
              <td>
                  <code></code><pre>[TooManyRowsAffectedException: Unexpected row count: 3; expected: 1]<br>   CounterSoft.Gemini.DataProvider.BaseProvider.SaveOrUpdateEntity(BaseEN beData) +61<br>   CounterSoft.Gemini.DataProvider.CustomFieldProvider.SaveCustomFieldData(CustomFieldDataEN cdseData) +252<br>   CounterSoft.Gemini.Business.CustomFields.SaveCustomFieldData(Int32 iUserID, Int32 iProjID, Int32 iIssueID, Int32 iCustomFieldID, String strCustomFieldData) +99<br>   CounterSoft.Gemini.EditIssue.SaveCustomFields(Int32 iIssueID) +204<br>   CounterSoft.Gemini.EditIssue.btnUpdate_Click(Object sender, EventArgs e) +907<br>   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105<br>   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107<br>   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7<br>   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11<br>   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33<br>   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102<br></pre></td></tr></tbody></table></font><br>What can I do ?<br><br>Thanks<br>Alain<br>
epsilon
· 1
epsilon
Replies (4)
helpful
0
not helpful

We can not seem to replicate this issue. Do you have triggers on the tables?


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

Yes I have triggers.

You're right, it works fine when I disable the triggers.
But why do they cause this error? How could I keep my triggers active?

Alain


epsilon
· 1
epsilon
helpful
0
not helpful

You need to put: "set nocount on" in your trigger(s)


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

Works perfect.

Thank You
Alain


epsilon
· 1
epsilon