View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
04980Bug reportsResponse browsingpublic2011-04-11 11:30
Reporteruser11833Assigned Toc_schmitz  
PrioritynormalSeverityblock 
Status closedResolutionfixed 
Product Version1.91RC2 
Fixed in Version1.91RC6 
Summary04980: Error editing response (MS SQL Server 2005)
Description

When saving changes to a response I get:

Update failed:
[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot update identity column 'id'.
UPDATE [lime_survey_16252] SET [id] = '3', [submitdate] = NULL, [startlanguage] = 'en', [token] (...)

Steps To Reproduce
  • Login into the Admin console
  • Select a survey that has responses
  • Select a response and edit
  • Change any field
  • select "Update Entry"
Additional Information

When building the Update query, the code iterates through EVERY field on the table INCLUDING the primary key. MySQL may be permissive about this, but SQL Server won't allow to update an Identity column.

In this case the solution is to remove the "id" column from being processed: "if ($fieldname != 'id') { ... " in "dataentry.php"

This problem may occur in other areas of the code with similar funcionality. So far, only caught it here.

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)9672
I will donate to the project if issue is resolvedNo
BrowserFirefox
Database type & versionMS SQL Server 2005
Server OS (if known)Windows Server 2003 SP2
Webserver software & version (if known)IIS 6.0
PHP Version5.2.13

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2011-03-08 12:05

administrator   ~14326

Please update to 1.91RC4 and tell us if the problem still exists.

c_schmitz

c_schmitz

2011-03-11 15:30

administrator   ~14405

If we don't get feedback on this I will have to close this issue.

user11833

2011-03-14 11:07

  ~14429

Tested with "Version 1.91RC4 Build 9797" and got the same error:

Update failed:
[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot update identity column 'id'.

c_schmitz

c_schmitz

2011-03-21 23:34

administrator   ~14505

Thank you.

c_schmitz

c_schmitz

2011-04-11 11:30

administrator   ~14766

1.91RC6 released.

Issue History

Date Modified Username Field Change
2011-02-23 18:00 user11833 New Issue
2011-02-23 19:46 user11833 Issue Monitored: user11833
2011-03-08 12:05 c_schmitz Note Added: 14326
2011-03-08 12:05 c_schmitz Assigned To => c_schmitz
2011-03-08 12:05 c_schmitz Status new => feedback
2011-03-11 15:30 c_schmitz Note Added: 14405
2011-03-14 11:07 user11833 Note Added: 14429
2011-03-14 11:07 user11833 Status feedback => assigned
2011-03-21 23:34 c_schmitz Note Added: 14505
2011-03-21 23:34 c_schmitz Status assigned => resolved
2011-03-21 23:34 c_schmitz Fixed in Version => 1.91RC6
2011-03-21 23:34 c_schmitz Resolution open => fixed
2011-04-11 11:30 c_schmitz Note Added: 14766
2011-04-11 11:30 c_schmitz Status resolved => closed