View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
09037Bug reportsImport/Exportpublic2014-05-25 22:00
Reporterfvanderstarre Assigned Toc_schmitz  
PrioritynormalSeveritypartial_block 
Status closedResolutionfixed 
Fixed in Version2.05+ 
Summary09037: Survey import from TSV file fails with PDOException (ms sql error 8106)
Description

Importing a survey from TSV file fails with ms sql error 8106:
"Table '%.*ls' does not have the identity property. Cannot perform SET operation.
You have attempted to use the SET IDENTITY_INSERT property on a table that does not contain an identity column."

Steps To Reproduce

Create survey TSV file and import into L.S.

Additional Information

/var/www/html/new/application/helpers/common_helper.php(6776)

6764 This function switches identity insert on/off for the MSSQL database
6765

6766 @param string $table table name (without prefix)
6767
@param mixed $state Set to true to activate ID insert, or false to deactivate
6768 */
6769 function switchMSSQLIdentityInsert($table,$state)
6770 {
6771 if (in_array(Yii::app()->db->getDriverName(), array('mssql', 'sqlsrv', 'dblib')))
6772 {
6773 if ($state == true)
6774 {
6775 // This needs to be done directly on the PDO object because when using CdbCommand or similar it won't have any effect
6776 Yii::app()->db->pdoInstance->exec('SET IDENTITY_INSERT '.Yii::app()->db->tablePrefix.$table.' ON');
6777 }
6778 else
6779 {
6780 // This needs to be done directly on the PDO object because when using CdbCommand or similar it won't have any effect
6781 Yii::app()->db->pdoInstance->exec('SET IDENTITY_INSERT '.Yii::app()->db->tablePrefix.$table.' OFF');
6782 }
6783 }
6784 }

TagsNo tags attached.
Attached Files
PDOExceptionImportTsv.jpg (95,213 bytes)   
PDOExceptionImportTsv.jpg (95,213 bytes)   
Ls2_em_tailoring.txt (33,835 bytes)   
class	type/scale	name	relevance	text	help	language	validaton	mandatory	other	default	same_default	allowed_filetypes	alphasort	answer_width	array_filter	array_filter_exclude	assessment_value	category_separator	display_columns	display_rows	dropdown_dates_year_min	dropdown_dates	dropdown_dates_year_max	dropdown_prefix	dropdown_prepostfix	dropdown_separators	dropdown_size	dualscale_headerA	dualscale_headerB	em_validation_q_tip	em_validation_q	em_validation_sq	em_validation_sq_tip	equals_num_value	exclude_all_others	exclude_all_others_auto	hidden	hide_tip	input_boxes	location_city	location_country	location_defaultcoordinates	location_mapheight	location_mapservice	location_mapwidth	location_mapzoom	location_nodefaultfromip	location_postal	location_state	max_answers	max_filesize	max_num_of_files	max_num_value	max_num_value_n	maximum_chars	min_answers	min_num_of_files	min_num_value	min_num_value_n	multiflexible_checkbox	multiflexible_max	multiflexible_min	multiflexible_step	num_value_int_only	numbers_only	other_comment_mandatory	other_numbers_only	other_replace_text	page_break	prefix	public_statistics	random_group	random_order	reverse	scale_export	show_comment	show_grand_total	show_title	show_totals	slider_accuracy	slider_default	slider_layout	slider_max	slider_middlestart	slider_min	slider_rating	slider_separator	slider_showminmax	suffix	text_input_width	time_limit_action	time_limit_countdown_message	time_limit_disable_next	time_limit_disable_prev	time_limit_message	time_limit_message_delay	time_limit_message_style	time_limit_timer_style	time_limit_warning_2_display_time	time_limit_warning_2_message	time_limit_warning_2_style	time_limit_warning_2	time_limit_warning	time_limit	time_limit_warning_display_time	time_limit_warning_message	time_limit_warning_style	use_dropdown
S		sid		561617																																																																																																								
S		owner_id		1																																																																																																								
S		admin		LimeSurvey Development Team																																																																																																								
S		active		N																																																																																																								
S		anonymized		N																																																																																																								
S		format		G																																																																																																								
S		savetimings		N																																																																																																								
S		template		default																																																																																																								
S		language		en																																																																																																								
S		datestamp		Y																																																																																																								
S		usecookie		N																																																																																																								
S		allowregister		N																																																																																																								
S		allowsave		Y																																																																																																								
S		autonumber_start		0																																																																																																								
S		autoredirect		N																																																																																																								
S		allowprev		Y																																																																																																								
S		printanswers		Y																																																																																																								
S		ipaddr		N																																																																																																								
S		refurl		N																																																																																																								
S		datecreated		2012-04-04																																																																																																								
S		publicstatistics		Y																																																																																																								
S		publicgraphs		N																																																																																																								
S		listpublic		Y																																																																																																								
S		htmlemail		Y																																																																																																								
S		sendconfirmation		Y																																																																																																								
S		tokenanswerspersistence		N																																																																																																								
S		assessments		N																																																																																																								
S		usecaptcha		N																																																																																																								
S		usetokens		N																																																																																																								
S		attributedescriptions		"a:3:{s:11:""attribute_1"";a:3:{s:11:""description"";s:11:""Attribute 1"";s:9:""mandatory"";s:1:""N"";s:13:""show_register"";s:1:""N"";}s:11:""attribute_2"";a:3:{s:11:""description"";s:11:""Attribute 2"";s:9:""mandatory"";s:1:""N"";s:13:""show_register"";s:1:""N"";}s:11:""attribute_3"";a:3:{s:11:""description"";s:11:""Attribute 3"";s:9:""mandatory"";s:1:""N"";s:13:""show_register"";s:1:""N"";}}"																																																																																																								
S		tokenlength		15																																																																																																								
S		showxquestions		Y																																																																																																								
S		showgroupinfo		B																																																																																																								
S		shownoanswer		Y																																																																																																								
S		showqnumcode		X																																																																																																								
S		bouncetime		0																																																																																																								
S		bounceprocessing		N																																																																																																								
S		showwelcome		Y																																																																																																								
S		showprogress		Y																																																																																																								
S		allowjumps		N																																																																																																								
S		navigationdelay		0																																																																																																								
S		nokeyboard		N																																																																																																								
S		alloweditaftercompletion		N																																																																																																								
S		googleanalyticsstyle		0																																																																																																								
SL		surveyls_title		Tailoring Examples		en																																																																																																						
SL		surveyls_description		This demo shows many of the new capabilities of LimeSurvey 1.92+ using the built-in ExpressionManager (EM), especially dynamic tailoring and conditional branching (relevance).		en																																																																																																						
SL		surveyls_email_invite_subj		Invitation to participate in a survey		en																																																																																																						
SL		surveyls_email_invite		"Dear {FIRSTNAME},<br /><br />you have been invited to participate in a survey.<br /><br />The survey is titled:<br />""{SURVEYNAME}""<br /><br />""{SURVEYDESCRIPTION}""<br /><br />To participate, please click on the link below.<br /><br />Sincerely,<br /><br />{ADMINNAME} ({ADMINEMAIL})<br /><br />----------------------------------------------<br />Click here to do the survey:<br />{SURVEYURL}<br /><br />If you do not want to participate in this survey and don't want to receive any more invitations please click the following link:<br />{OPTOUTURL}"		en																																																																																																						
SL		surveyls_email_remind_subj		Reminder to participate in a survey		en																																																																																																						
SL		surveyls_email_remind		"Dear {FIRSTNAME},<br /><br />Recently we invited you to participate in a survey.<br /><br />We note that you have not yet completed the survey, and wish to remind you that the survey is still available should you wish to take part.<br /><br />The survey is titled:<br />""{SURVEYNAME}""<br /><br />""{SURVEYDESCRIPTION}""<br /><br />To participate, please click on the link below.<br /><br />Sincerely,<br /><br />{ADMINNAME} ({ADMINEMAIL})<br /><br />----------------------------------------------<br />Click here to do the survey:<br />{SURVEYURL}<br /><br />If you do not want to participate in this survey and don't want to receive any more invitations please click the following link:<br />{OPTOUTURL}"		en																																																																																																						
SL		surveyls_email_register_subj		Survey registration confirmation		en																																																																																																						
SL		surveyls_email_register		Dear {FIRSTNAME},<br /><br />You, or someone using your email address, have registered to participate in an online survey titled {SURVEYNAME}.<br /><br />To complete this survey, click on the following URL:<br /><br />{SURVEYURL}<br /><br />If you have any questions about this survey, or if you did not register to participate and believe this email is in error, please contact {ADMINNAME} at {ADMINEMAIL}.		en																																																																																																						
SL		surveyls_email_confirm_subj		Confirmation of your participation in our survey		en																																																																																																						
SL		surveyls_email_confirm		Dear {FIRSTNAME},<br /><br />this email is to confirm that you have completed the survey titled {SURVEYNAME} and your response has been saved. Thank you for participating.<br /><br />If you have any further questions about this email, please contact {ADMINNAME} on {ADMINEMAIL}.<br /><br />Sincerely,<br /><br />{ADMINNAME}		en																																																																																																						
SL		surveyls_dateformat		7		en																																																																																																						
SL		surveyls_attributecaptions		"a:3:{s:11:""attribute_1"";s:11:""Attribute 1"";s:11:""attribute_2"";s:11:""Attribute 2"";s:11:""attribute_3"";s:11:""Attribute 3"";}"		en																																																																																																						
SL		email_admin_notification_subj		Response submission for survey {SURVEYNAME}		en																																																																																																						
SL		email_admin_notification		Hello,<br /><br />A new response was submitted for your survey '{SURVEYNAME}'.<br /><br />Click the following link to reload the survey:<br />{RELOADURL}<br /><br />Click the following link to see the individual response:<br />{VIEWRESPONSEURL}<br /><br />Click the following link to edit the individual response:<br />{EDITRESPONSEURL}<br /><br />View statistics by clicking here:<br />{STATISTICSURL}		en																																																																																																						
SL		email_admin_responses_subj		Response submission for survey {SURVEYNAME} with results		en																																																																																																						
SL		email_admin_responses		"<style type=""text/css"">                                                 .printouttable {                                                   margin:1em auto;                                                 }                                                 .printouttable th {                                                   text-align: center;                                                 }                                                 .printouttable td {                                                   border-color: #ddf #ddf #ddf #ddf;                                                   border-style: solid;                                                   border-width: 1px;                                                   padding:0.1em 1em 0.1em 0.5em;                                                 }                                                  .printouttable td:first-child {                                                   font-weight: 700;                                                   text-align: right;                                                   padding-right: 5px;                                                   padding-left: 5px;                                                  }                                                 .printouttable .printanswersquestion td{                                                   background-color:#F7F8FF;                                                 }                                                  .printouttable .printanswersquestionhead td{                                                   text-align: left;                                                   background-color:#ddf;                                                 }                                                  .printouttable .printanswersgroup td{                                                   text-align: center;                                                           font-weight:bold;                                                   padding-top:1em;                                                 }                                                 </style>Hello,<br /><br />A new response was submitted for your survey '{SURVEYNAME}'.<br /><br />Click the following link to reload the survey:<br />{RELOADURL}<br /><br />Click the following link to see the individual response:<br />{VIEWRESPONSEURL}<br /><br />Click the following link to edit the individual response:<br />{EDITRESPONSEURL}<br /><br />View statistics by clicking here:<br />{STATISTICSURL}<br /><br /><br />The following answers were given by the participant:<br />{ANSWERTABLE}"		en																																																																																																						
SL		surveyls_numberformat		0		en																																																																																																						
G		Hidden Equations to Compute BMI	1	This computes your body mass index (BMI) and tells you your weight status.<br/> It demonstrates the use of hidden Equation-type questions, whose values are stored in the database even though hidden on the screen.		en																																																																																																						
Q	N	weight	1	How much do you weigh?		en		Y	N		1																											1																					0,1																																																	
Q	!	weight_units	1	Which units are you using for weight?		en		Y	N		1																											1																																																																						
A	0	kg	kg	kilograms		en																																																																																																						
A	0	lb	lb	pounds		en																																																																																																						
Q	*	weight_kg	1	{if(weight_units=='kg',weight,weight*.453592)}		en			N		1																										1																																																																							
Q	N	height	1	How tall are you?		en		Y	N		1																											1																					0,1																																																	
Q	!	height_units	1	Which units are you using for height?		en		Y	N		1																											1																																																																						
A	0	m	m	meters		en																																																																																																						
A	0	i	i	inches		en																																																																																																						
Q	*	height_m	1	{if(height_units=='m',height,height * 0.0254)}		en			N		1																										1																																																																							
Q	*	BMI	! is_empty(height) and  ! is_empty(weight)	{weight_kg/(height_m * height_m)}		en			N		1																										1																																																																							
Q	*	weight_status	! is_empty(height) and  ! is_empty(weight)	{if(BMI <= 18.5,'underweight', if(BMI < 25, 'normal weight', if(BMI < 30, 'overweight', if(BMI < 35, 'obese', if(BMI < 40, 'very obese', 'extremely obese')))))}		en			N		1																										1																																																																							
Q	X	Report	! is_empty(height) and  ! is_empty(weight) &&  ! is_empty(height_units) and  ! is_empty(weight_units)	You said you are {height} {height_units.shown} tall, and weigh {weight} {weight_units.shown}.<br/> Your Body Mass Index (BMI) is {round(BMI,2)}.<br /> Assuming you are an adult, you are  {weight_status}.		en			N		1																																																																																1																	
G		Dynamic, On-page Report Generation	1	After saying where you live, watch how your answers dynamically change the reports at the bottom of the page.		en																																																																																																						
Q	S	city	1	What city do you live in?		en			N		1																																300		500	11																																													1																	
Q	N	yearsThere	! is_empty(city)	How long have you lived in {city} (years)?		en			N		1																																																																																																	
Q	R	ranking	! is_empty(yearsThere)	Which do you like best about {city}?		en			N		1																																																																																																	
SQ	0	1		Rank 1		en																																																																																																						
SQ	0	2		Rank 2		en																																																																																																						
SQ	0	3		Rank 3		en																																																																																																						
SQ	0	4		Rank 4		en																																																																																																						
A	0	sport	sport	Sporting Events		en																																																																																																						
A	0	cult	cult	Cultural Events		en																																																																																																						
A	0	rel	rel	Religious Events		en																																																																																																						
A	0	pol	pol	Political Events		en																																																																																																						
Q	E	opinions	! is_empty(yearsThere)	How should the following change in {city}?		en			N		1																																																																																																	
SQ	0	tax		Taxes		en																																																																																																						
SQ	0	srv		Services		en																																																																																																						
SQ	0	evt		Events		en																																																																																																						
Q	1	worries	! is_empty(yearsThere)	How bad off is {city} on these issues, and how much do you worry about them?		en			N		1																	Severity																																																																																
SQ	0	taxes		Property Tax rate		en																																																																																																						
SQ	0	smog		Smog		en																																																																																																						
SQ	0	trans		Transportation		en																																																																																																						
A	0	s1	s1	Mild Severity		en																																																																																																						
A	0	s2	s2	Moderate Severity		en																																																																																																						
A	0	s3	s3	Extreme Severity		en																																																																																																						
A	1	b1	b1	Mild Bothersomeness		en																																																																																																						
A	1	b2	b2	Moderate Bothersomeness		en																																																																																																						
A	1	b3	b3	Extreme Bothersomeness		en																																																																																																						
Q	X	report	! is_empty(yearsThere)	Here is what you said about {city}, where you have lived for {yearsThere} years:</br>  <table border='1'> <tr><th>#</th><th>Question</th><th>Code</th><th>Value</th><th>Shown</th></tr> <tr><td>{city.qid}</td><td>{city.question}</td><td>{city}</td><td>{city.value}</td><td>{city.shown}</td></tr> <tr><td>{yearsThere.qid}</td><td>{yearsThere.question}</td><td>{yearsThere}</td><td>{yearsThere.value}</td><td>{yearsThere.shown}</td></tr> <tr><td>{ranking_1.qid}</td><td>{ranking_1.question}</td><td>{ranking_1}</td><td>{ranking_1.value}</td><td>{ranking_1.shown}</td></tr> <tr><td>{ranking_2.qid}</td><td>{ranking_2.question}</td><td>{ranking_2}</td><td>{ranking_2.value}</td><td>{ranking_2.shown}</td></tr> <tr><td>{ranking_3.qid}</td><td>{ranking_3.question}</td><td>{ranking_3}</td><td>{ranking_3.value}</td><td>{ranking_3.shown}</td></tr> <tr><td>{ranking_4.qid}</td><td>{ranking_4.question}</td><td>{ranking_4}</td><td>{ranking_4.value}</td><td>{ranking_4.shown}</td></tr> <tr><td>{opinions_tax.qid}</td><td>{opinions_tax.question}</td><td>{opinions_tax}</td><td>{opinions_tax.value}</td><td>{opinions_tax.shown}</td></tr> <tr><td>{opinions_srv.qid}</td><td>{opinions_srv.question}</td><td>{opinions_srv}</td><td>{opinions_srv.value}</td><td>{opinions_srv.shown}</td></tr> <tr><td>{opinions_evt.qid}</td><td>{opinions_evt.question}</td><td>{opinions_evt}</td><td>{opinions_evt.value}</td><td>{opinions_evt.shown}</td></tr> <tr><td>{worries_taxes_0.qid}</td><td>{worries_taxes_0.question}</td><td>{worries_taxes_0}</td><td>{worries_taxes_0.value}</td><td>{worries_taxes_0.shown}</td></tr> <tr><td>{worries_taxes_1.qid}</td><td>{worries_taxes_1.question}</td><td>{worries_taxes_1}</td><td>{worries_taxes_1.value}</td><td>{worries_taxes_1.shown}</td></tr> <tr><td>{worries_smog_0.qid}</td><td>{worries_smog_0.question}</td><td>{worries_smog_0}</td><td>{worries_smog_0.value}</td><td>{worries_smog_0.shown}</td></tr> <tr><td>{worries_smog_1.qid}</td><td>{worries_smog_1.question}</td><td>{worries_smog_1}</td><td>{worries_smog_1.value}</td><td>{worries_smog_1.shown}</td></tr> <tr><td>{worries_trans_0.qid}</td><td>{worries_trans_0.question}</td><td>{worries_trans_0}</td><td>{worries_trans_0.value}</td><td>{worries_trans_0.shown}</td></tr> <tr><td>{worries_trans_1.qid}</td><td>{worries_trans_1.question}</td><td>{worries_trans_1}</td><td>{worries_trans_1.value}</td><td>{worries_trans_1.shown}</td></tr> </table> Is this correct? 		en			N		1																																																																																1																	
Q	X	report2	! is_empty(yearsThere)	"Here is a double-check that INSERTANS:xxx works as expected.<br /> <table border=""1"">  <tbody>   <tr>    <th>     Var</th>    <th>     SGQA</th>    <th>     INSERTANS:SGQA</th>   </tr>   <tr>    <td>     city</td>    <td>     561617X69X1321</td>    <td>     {561617X69X1321}, {INSERTANS:561617X69X1321}</td>   </tr>   <tr>    <td>     yearsThere</td>    <td>     561617X69X1322</td>    <td>     {561617X69X1322}, {INSERTANS:561617X69X1322}</td>   </tr>   <tr>    <td>     ranking_2</td>    <td>     561617X69X13232</td>    <td>     {561617X69X13232}, {INSERTANS:561617X69X13232}</td>   </tr>   <tr>    <td>     opinions_srv</td>    <td>     561617X69X1324srv</td>    <td>     {561617X69X1324srv}, {INSERTANS:561617X69X1324srv}</td>   </tr>   <tr>    <td>     worries_smog_0</td>    <td>     561617X69X1325smog#0</td>    <td>     {561617X69X1325smog#0}, {INSERTANS:561617X69X1325smog#0}</td>   </tr>   <tr>    <td>     worries_trans_1</td>    <td>     561617X69X1325trans#1</td>    <td>     {561617X69X1325trans#1}, {INSERTANS:561617X69X1325trans#1}</td>   </tr>  </tbody> </table> <p>  &nbsp;</p>"		en			N		1																																																																																1																	
G		Dynamic Math Display	1	Shows the syntax of all of the currently available math function.  Change the values for num and num2 to show how its results change.		en																																																																																																						
Q	X	math	1	<table border='1'> <tr><th>Function</th><th>Syntax</th><th>Result</th></tr> <tr><td>Absolute value</td><td>abs({num})</td><td>{if(is_numeric(num),abs(num),'')}</td></tr> <tr><td>Arc cosine</td><td>acos({num})</td><td>{if(is_numeric(num),acos(num),'')}</td></tr> <tr><td>Arc sine</td><td>asin({num})</td><td>{if(is_numeric(num),asin(num),'')}</td></tr> <tr><td>Arc tangent of two variables</td><td>atan2({num},{num2})</td><td>{if(is_numeric(num) && is_numeric(num2),atan2(num,num2),'')}</td></tr> <tr><td>Arc tangent</td><td>atan({num})</td><td>{if(is_numeric(num),atan(num),'')}</td></tr> <tr><td>Round fractions up</td><td>ceil({num})</td><td>{if(is_numeric(num),ceil(num),'')}</td></tr> <tr><td>Cosine</td><td>cos({num})</td><td>{if(is_numeric(num),cos(num),'')}</td></tr> <tr><td>Calculates the exponent of e</td><td>exp({num})</td><td>{if(is_numeric(num),exp(num),'')}</td></tr> <tr><td>Round fractions down</td><td>floor({num})</td><td>{if(is_numeric(num),floor(num),'')}</td></tr> <tr><td>Finds whether a value is not a number</td><td>is_nan({num})</td><td>{if(is_numeric(num),is_nan(num),'')}</td></tr> <tr><td>Natural logarithm</td><td>log({num})</td><td>{if(is_numeric(num),log(num),'')}</td></tr> <tr><td>Get value of pi</td><td>pi()</td><td>{pi()}</td></tr> <tr><td>Exponential expression</td><td>pow({num},{num2})</td><td>{if(is_numeric(num) && is_numeric(num2),pow(num,num2),'')}</td></tr> <tr><td>Generate a random integer</td><td>rand()</td><td>{rand()}</td></tr> <tr><td>Rounds a float</td><td>round({num})</td><td>{if(is_numeric(num),round(num),'')}</td></tr> <tr><td>Sine</td><td>sin({num})</td><td>{if(is_numeric(num),sin(num),'')}</td></tr> <tr><td>Square root</td><td>sqrt({num})</td><td>{if(is_numeric(num),sqrt(num),'')}</td></tr> <tr><td>Calculate the sum of values in an array</td><td>sum({num})</td><td>{if(is_numeric(num),sum(num),'')}</td></tr> <tr><td>Tangent</td><td>tan({num})</td><td>{if(is_numeric(num),tan(num),'')}</td></tr> <tr><td>Find lowest value</td><td>min({num2},{num},{num}+{num2},{num}-{num2},{num}*{num2},{num}/2)</td><td>{if(is_numeric(num),min(num2,num,num+num2,num-num2,num*num2,num/2),'')}</td></tr> <tr><td>Find highest value</td><td>max({num2},{num},{num}+{num2},{num}-{num2},{num}*{num2},{num}/2)</td><td>{if(is_numeric(num),max(num2,num,num+num2,num-num2,num*num2,num/2),'')}</td></tr> <tr><td>Sum</td><td>sum({num2},{num},{num}+{num2},{num}-{num2},{num}*{num2},{num}/2)</td><td>{if(is_numeric(num),sum(num2,num,num+num2,num-num2,num*num2,num/2),'')}</td></tr> <tr><td>Join array elements with a string</td><td>implode('~',{num2},{num},{num}+{num2},{num}-{num2},{num}*{num2},{num}/2)</td><td>{implode('~',num2,num,num+num2,num-num2,num*num2,num/2)}</td></tr> <tr><td>Get the integer value of a variable</td><td>intval({num})</td><td>{if(is_numeric(num),intval(num),'')}</td></tr> <tr><td>Finds whether the type of a variable is float</td><td>is_float({num})</td><td>{if(is_numeric(num),is_float(num),'')}</td></tr> <tr><td>Finds whether the type of a variable is integer</td><td>is_int({num})</td><td>{if(is_numeric(num),is_int(num),'')}</td></tr> <tr><td>Finds whether the type of a variable is NULL</td><td>is_null({num})</td><td>{is_null(num)}</td></tr> <tr><td>Finds whether a variable is a number or a numeric string</td><td>is_numeric({num})</td><td>{is_numeric(num)}</td></tr> <tr><td>Finds whether the type of a variable is string</td><td>is_string({num})</td><td>{is_string(num)}</td></tr> <tr><td>Determine whether a variable is considered to be empty</td><td>is_empty({num})</td><td>{is_empty(num)}</td></tr> </table>		en			N		1																																																																																1																	
Q	S	num	1	Enter a number		en			N		1																																300		500	11																																													1																	
Q	S	num2	1	Enter another number		en			N		1																																300		500	11																																													1																	
G		Dynamic Relevance	1	Shows how Relevance can be change question visibility (e.g. dynamic branching).		en																																																																																																						
Q	S	name	1	What is your name?		en			N		1																																300		500	11																																													1																	
Q	N	age	! is_empty(name)	How old are you?	Only asked if you provide a name	en			N		1																																																																																																	
Q	Y	married	age > 5	Are you married?	Only asked if age > 5 (and one hopes much older)	en			N		1																																																																																																	
Q	N	yearsMarried	"married == ""Y"""	How many years have you been married, {name}?		en			N		1																											1																age-5																																																						
Q	N	numKids	age > 11	How many children do you have?	Only asked if your age is > 11 (and one hopes much older)	en			N		1																																																																																																	
Q	N	kid1	numKids >= 1	How old is your first child?		en		Y	N		1																																																																																																	
Q	N	kid2	numKids >= 2	How old is your second child?		en		Y	N		1																																																																																																	
Q	N	kid3	numKids >= 3	How old is your third child?		en		Y	N		1																																																																																																	
Q	N	kid4	numKids >= 4	How old is your fourth child?		en		Y	N		1																																																																																																	
Q	N	kid5	numKids >= 5	How old is your fifth child?		en		Y	N		1																																																																																																	
Q	X	message2	1	{if(is_empty(name),'Please enter some information about yourself',implode(' ','Hi',name,'!'))}<br/> {if(is_empty(name),'',if(is_empty(age),'How old are you?',implode(' ','So, you are',age,'years old.  Funny, you don\'t look it.')))}<br/> {if(numKids>0,implode(' ','I hope you enjoy playing with your',if(numKids==1,'child!',implode(' ',numKids,'children!')),' I love my two girls!'),'')}<br/> {if(numKids>1,implode('','The sum of the ages of your first ',min(5,numKids),' children is ',sum(kid1.NAOK,kid2.NAOK,kid3.NAOK,kid4.NAOK,kid5.NAOK),''),'')}<br/> {if(sum(kid1.NAOK,kid2.NAOK,kid3.NAOK,kid4.NAOK,kid5.NAOK)>age,'Wow, that means that the combined age of your children exceeds your own!','')}<br/> {if((married=='Y' and max(kid1.NAOK,kid2.NAOK,kid3.NAOK,kid4.NAOK,kid5.NAOK)>yearsMarried),'Hmmm, your oldest child is older than your marriage.  Interesting.','')}	Shows a summary of the information you entered above.  Try entering ages of 5, 8, and 30.  Also try making one of your kids older than your marriage, or putting in combined ages of your children that exceed your own age.	en			N		1																																																																																1																	
G		Final Page	1	This page is here so that you can backup and change values prior to submitting your responses.		en																																																																																																						
Q	X	tThanks	1	<p>  You're all done, thanks!</p> 		en			N		1																																																																																1																	
Ls2_em_tailoring.txt (33,835 bytes)   
Bug heat4
Complete LimeSurvey version number (& build)2.05+ 140302
I will donate to the project if issue is resolvedNo
BrowserFirefox
Database type & versionMS SQL server 2008 10.0.5500.0 (X64)
Server OS (if known)DB server: Windows NT 6.1 <X64> build 7601 SP1. Appl/web server: Linux RHEL 5.8
Webserver software & version (if known)Apache/2.2.3 (Red Hat)
PHP Version5.3.3

Users monitoring this issue

There are no users monitoring this issue.

Activities

fvanderstarre

fvanderstarre

2014-05-19 15:13

reporter   ~29983

Uploaded import tsv file (Ls2_em_tailoring.txt), taken from the manual page: http://manual.limesurvey.org/images/7/77/Ls2_em_tailoring.xls

fvanderstarre

fvanderstarre

2014-05-20 13:55

reporter   ~30001

sql statement: "SET IDENTITY_INSERT surveys ON". Table surveys has no identity column.

c_schmitz

c_schmitz

2014-05-20 16:25

administrator   ~30013

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

Related Changesets

LimeSurvey: master b7344f30

2014-05-20 14:25:39

c_schmitz

Details Diff
Fixed issue 09037: Survey import from TSV file fails with PDOException Affected Issues
09037
mod - application/helpers/admin/import_helper.php Diff File

Issue History

Date Modified Username Field Change
2014-05-15 14:15 fvanderstarre New Issue
2014-05-15 14:15 fvanderstarre File Added: PDOExceptionImportTsv.jpg
2014-05-19 15:10 fvanderstarre File Added: Ls2_em_tailoring.txt
2014-05-19 15:13 fvanderstarre Note Added: 29983
2014-05-20 13:55 fvanderstarre Note Added: 30001
2014-05-20 16:24 c_schmitz Assigned To => c_schmitz
2014-05-20 16:24 c_schmitz Status new => assigned
2014-05-20 16:25 c_schmitz Status assigned => resolved
2014-05-20 16:25 c_schmitz Fixed in Version => 2.05+
2014-05-20 16:25 c_schmitz Resolution open => fixed
2014-05-20 16:25 c_schmitz Changeset attached => LimeSurvey master b7344f30
2014-05-20 16:25 c_schmitz Note Added: 30013
2014-05-25 22:00 c_schmitz Status resolved => closed