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.




Unexpected row count: -1;

web-app

Hey,

I have problems updating data in gemini. Everytime I push any Save button I get an exception.
'Unexpected row count: -1; expected: 1
    at CounterSoft.Gemini.DataProvider.x73a34067f4cd229a.x097cc82acf165ae9(BaseEN x6fcb9c1c812a0558)
   at CounterSoft.Gemini.Business.ApplicationSettings.UpdateSetting(ApplicationSettingEN aseData)
   at CounterSoft.Gemini.Web.Admin.SecuritySettings.btnUpdate_Click(Object sender, EventArgs e)
   at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
   at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)'

First I used integrated security, then I tried SQL Authentication, but to no avail.

OS: Windows Server 2008 R2 Webserver
DB: SQL 2008 Web
Gemini-Version: v3.6.3 Build 2590

I haven't touched the DB or the code at all. I hope you guys can help me.


deval
· 1
deval
Replies (7)
helpful
0
not helpful

Is this an upgrade? Please check the contents of the gemini_applicationsettings table and make sure you don't have any duplicates in there.


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

Hi,

no it was a fresh install on a newly setup server.
I checked the geminiapplicationsettings and there was one duplicated setting,
EnabledEmailAlertTypes
I deleted the last one, but unfortunatley the same error comes up.
I have 59 entries after deleting the last one.

29 05/03/2010 14:37:39 Error Gemini Unexpected row count: -1; expected: 1 at CounterSoft.Gemini.DataProvider.x73a34067f4cd229a.x097cc82acf165ae9(BaseEN x6fcb9c1c812a0558) at CounterSoft.Gemini.Business.ApplicationSettings.UpdateSetting(ApplicationSettingEN aseData) at CounterSoft.Gemini.IssueGeneral.btnUpdate
Click(Object sender, EventArgs e) at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Thanks


deval
· 1
deval
helpful
0
not helpful

did you install the sample database or created a blank one from the scripts?
Are you able to run SQL profiler to catch the offending SQL?


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

Hi,

I created blank database. Regarding the Sql Profiler. With default settings (Profiler) the following happens:

1.
-- network protocol: LPC
set quotedidentifier on
set arithabort on
set numeric
roundabort off
set ansiwarnings on
set ansi
padding on
set ansinulls on
set concat
nullyieldsnull on
set cursorcloseoncommit off
set implicit
transactions off
set language Deutsch
set dateformat dmy
set datefirst 1
set transaction isolation level read committed

2.
exec spexecutesql N'UPDATE geminiapplicationsettings SET settingname = @p0, settingcategory = @p1, settingvalue = @p2, settingdesc = @p3 WHERE settingid = @p4',N'@p0 nvarchar(24),@p1 nvarchar(8),@p2 nvarchar(2),@p3 nvarchar(95),@p4 int',@p0=N'ShowUserRegistrationLink',@p1=N'Security',@p2=N'NO',@p3=N'Controls whether the logon page displays a link that would allow anyone to register as a member',@p4=27

3.
-- network protocol: LPC
set quotedidentifier on
set arithabort on
set numeric
roundabort off
set ansiwarnings on
set ansi
padding on
set ansinulls on
set concat
nullyieldsnull on
set cursorcloseoncommit off
set implicit
transactions off
set language Deutsch
set dateformat dmy
set datefirst 1
set transaction isolation level read committed


4.
 RPC:Completed    exec geminilogmessage @messagetype='Error',@messagesource='Gemini',@logmessage='Unexpected row count: -1; expected: 1
    at CounterSoft.Gemini.DataProvider.x73a34067f4cd229a.x097cc82acf165ae9(BaseEN x6fcb9c1c812a0558)
   at CounterSoft.Gemini.Business.ApplicationSettings.UpdateSetting(ApplicationSettingEN aseData)
   at CounterSoft.Gemini.Web.Admin.SecuritySettings.btnUpdate
Click(Object sender, EventArgs e)
   at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
   at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)',@username=''    .Net SqlClient Data Provider    NETZWERKDIENST    NT-AUTORITÄT\NETZWERKDIENST    0    14    3    387    4044    51    2010-03-05 12:13:34.247    2010-03-05 12:13:34.633    0X00000000050000002200670065006D0069006E0069005F006C006F0067006D006500730073006100670065004100000081001400A7307600610072006300680061007200280035002900180040006D006500730073006100670065007400790070006500050000004572726F724600000081001400A73076006100720063006800610072002800360029001C0040006D0065007300730061006700650073006F0075007200630065000600000047656D696E69FE02000081001800A730760061007200630068006100720028003700300034002900160040006C006F0067006D00650073007300610067006500C0020000556E657870656374656420726F7720   

When I execute the update sql in the SQL Query Analyser, it works fine. I'm not getting any errormessages there.


deval
· 1
deval
helpful
0
not helpful

Can you please check your SQL server setting and make sure that no count is not ticked?
Open SQL management studio, connect to the server, right click on it -> Properties and select the "Connections" tab, scroll the list and find "no count" make sure it is not ticked.
This should solve it.


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

Damn, I should've waited for your answer, I just re-installed the whole application but got the same error again.
It is the No Count setting indeed!

Thanks!


deval
· 1
deval
helpful
0
not helpful

Sorry it took too long to spot this, never noticed the negative sign....

Glad all is well now.


Mark Wing
· 9108
Mark Wing