View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
06984Bug reportsResponse browsingpublic2015-06-16 11:49
ReporterpfpDave Assigned Tomdekker  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.00+ 
Fixed in Version2.00+ 
Summary06984: Can't save edits to a response with MSSQL Server (Field Name's not wrapped)
Description

When attempting to save edits to a response the error 'Error executing query in dbExecuteAssoc:CDbCommand failed to execute the SQL statement:' is generated and the SQL contains fields that begin with an integer that aren't wrapped in double quotes or square brackets such as in this extract:

678563X12X1313 = '2', 678563X12X1314 = '3',

where it should be:

"678563X12X1313" = '2', "678563X12X1314" = '3',

... or (for MS SQL only) ...

[678563X12X1313] = '2', [678563X12X1314] = '3',

TagsNo tags attached.
Bug heat8
Complete LimeSurvey version number (& build)121127
I will donate to the project if issue is resolvedNo
BrowserIE8
Database type & versionSQL Express 2012
Server OS (if known)Server 2008
Webserver software & version (if known)IIS 7
PHP Version5.4.8

Users monitoring this issue

There are no users monitoring this issue.

Activities

mdekker

mdekker

2012-11-29 13:03

reporter   ~22694

YOur error probably has simething with a line numer in it and the file that gives the error. Could you attach that? Thanks!

pfpDave

pfpDave

2012-11-29 13:40

reporter   ~22695

It doesn't I'm afraid ... just a white screen with the error text as it appears in my comment followed by the full SQL query ... here's the query from a test survey:

Error executing query in dbExecuteAssoc:CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: [Microsoft][SQL Server Native Client 11.0][SQL Server]Incorrect syntax near '897685'.. The SQL statement executed was: UPDATE survey_897685 SET submitdate = '1980-01-01 00:00:00.000', startlanguage = 'en', token = 'ydfdskzqp9btps7', 897685X4X611 = '1', 897685X4X612 = '1', 897685X4X613 = '3' WHERE id=1

pfpDave

pfpDave

2012-11-29 13:41

reporter   ~22696

The URL is /index.php/admin/dataentry/update

mdekker

mdekker

2012-11-29 14:00

reporter   ~22702

do you have debug=2 in your config.php? you can leave the debugsql to 0

pfpDave

pfpDave

2012-11-29 14:39

reporter   ~22706

I have both set actually:

    'debug'=>2,
    'debugsql'=>1,
mdekker

mdekker

2012-11-29 15:37

reporter   ~22708

Ok well the url was specific enough :) Will post a fix soon

mdekker

mdekker

2012-11-29 15:57

reporter   ~22709

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=10567

mdekker

mdekker

2012-11-29 15:59

reporter   ~22710

Fix committed to 2.1 branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=10568

mdekker

mdekker

2012-11-29 15:59

reporter   ~22711

Should be working now, also updated the link to brwose this response

c_schmitz

c_schmitz

2012-12-04 13:16

administrator   ~22866

LimeSurvey 2.0+ build 121204 released.

sammousa

sammousa

2015-06-16 11:49

reporter   ~32381

Fix committed to develop branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=15435

Related Changesets

LimeSurvey: 2.1 34960a63

2012-11-29 15:57

mdekker


Details Diff
Fixed 06984: Can't save edits to a response with MSSQL Server (Field Name's not wrapped)
dev: also updated link to browse response
Affected Issues
06984
mod - application/controllers/admin/dataentry.php Diff File

LimeSurvey: master 2d6b08ec

2012-11-29 15:57

mdekker


Details Diff
Fixed 06984: Can't save edits to a response with MSSQL Server (Field Name's not wrapped)
dev: also updated link to browse response
Affected Issues
06984
mod - application/controllers/admin/dataentry.php Diff File

LimeSurvey: develop 4978c6e9

2015-06-16 11:06

sammousa


Details Diff
Fixed issue 06984 Affected Issues
06984
mod - application/controllers/GroupsController.php Diff File
mod - application/helpers/globals.php Diff File
mod - application/models/QuestionGroup.php Diff File

Issue History

Date Modified Username Field Change
2012-11-29 11:15 pfpDave New Issue
2012-11-29 13:03 mdekker Note Added: 22694
2012-11-29 13:40 pfpDave Note Added: 22695
2012-11-29 13:41 pfpDave Note Added: 22696
2012-11-29 14:00 mdekker Note Added: 22702
2012-11-29 14:39 pfpDave Note Added: 22706
2012-11-29 15:37 mdekker Note Added: 22708
2012-11-29 15:57 mdekker Changeset attached => LimeSurvey master 2d6b08ec
2012-11-29 15:57 mdekker Note Added: 22709
2012-11-29 15:57 mdekker Assigned To => mdekker
2012-11-29 15:57 mdekker Resolution open => fixed
2012-11-29 15:59 mdekker Changeset attached => LimeSurvey 2.1 34960a63
2012-11-29 15:59 mdekker Note Added: 22710
2012-11-29 15:59 mdekker Note Added: 22711
2012-11-29 15:59 mdekker Status new => resolved
2012-11-29 15:59 mdekker Fixed in Version => 2.00+
2012-12-04 13:16 c_schmitz Note Added: 22866
2012-12-04 13:16 c_schmitz Status resolved => closed
2015-06-16 11:49 sammousa Changeset attached => LimeSurvey develop 4978c6e9
2015-06-16 11:49 sammousa Note Added: 32381