Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Survey table could not be created. Database error!!

  • pgasper
  • pgasper's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 3 months ago #90455 by pgasper
I recently updated from 1.7 to the newest release and the db conversion failed. So I did a fresh install and have been recreating and updating my surveys. The first one was activated fine and is operational. The second survey will not activate giving the following error


Activate survey (245112)
Survey table could not be created.

Database error!!

Main admin screen


It gives me no useful error. I have no way to debug this. What can I do?

I tried creating a new survey using the copy function. A copy of the already activated survey activates fine. A copy of the non-activating survey also will not activate. So it appears to be a problem with this particular survey.

I went to edit->survey logic file and it detected no syntax errors.
I tried regenerating the question codes, no affect.
I did a db consistancy check and it only found an orphan default value to be deleted and no other problems. Deleting it had no affect.

I'm really reaching here. I see nothing within limesurvey to fix this nor tell what the problem is. The DB is functioning and surveys can still be created and activated, just not this one.
The topic has been locked.
  • pgasper
  • pgasper's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 3 months ago #90456 by pgasper
Ok. So I systematically deleted groups and questions, activating in between, to find the offending question. I had one multiple choice question with two subquestions that were identical (both the text and the code). Deleting the duplicate option fixed the problem.

Should not the survey logic check found this?
Should not the activate survey error returned useful information?
Should not the save subquestions function double checked for duplicate or invalid items?
Is this worth a bug report?
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
8 years 2 weeks ago #132979 by Mazi

pgasper wrote: Ok. So I systematically deleted groups and questions, activating in between, to find the offending question. I had one multiple choice question with two subquestions that were identical (both the text and the code). Deleting the duplicate option fixed the problem.

Should not the survey logic check found this?
Should not the activate survey error returned useful information?
Should not the save subquestions function double checked for duplicate or invalid items?

This most probably was not a problem related to the identical codes (such duplicate codes are throwing errors at later Limesurvey versions), but it was most probably caused by the survey size (too many columns), see manual.limesurvey.org/General_FAQ#...regarding_survey_size

Thus, deleting some questions fixed the problem for you.

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
  • tammo
  • tammo's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
7 years 10 months ago #135475 by tammo
I also ran into this problem with a survey with more than 10 arrays, each about 20 x 25 items (I know this sounds crazy, but it is actually used).

Is there any way to split up a survey in several minisurveys, like per group?

Tammo


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
7 years 10 months ago #135477 by Mazi
There is no easy way for this, you have to at least pass e.g. the data set ID from survey 1 into a hidden question at survey 2 in order to be able to merge results later.

If conditions are used, you may have to pre-populate further (hidden) questions at survey 2.

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
  • tammo
  • tammo's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
7 years 10 months ago #135478 by tammo
This means that after two days of work, I have to conclude that I should use another tool? Wow... this is frsutrating. I'll write a feature request that warns the person that is defining a survey that he/she is approching the magic border, beyond where no person can travel... or no person can activate a survey.

I must have passed that border early in the first day and LimeSurvey just let me continue, until the moment that I want to activate... That is rather late...


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
7 years 10 months ago #135479 by Mazi
Tammo, if it would easily be possible to detect the max number of allowed columns, we would have already coded this. But it is not that easy. The limit does not only depend on the DBMS being used but also the number of questions, question types, number of sub-questions, ...

See manual.limesurvey.org/General_FAQ#...regarding_survey_size for some more details.

So a hint for everyone: Always test-activate large surveys.

BTW, questions of type Array numbers/texts take the most space because each cell is actually a single answer (=DB column). So having an Array texts question with 20 answers and 50 sub-questions already sums up to 1000 columns!
Check/adjust such questions first if you run into this limit.

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
  • tammo
  • tammo's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
7 years 10 months ago #135480 by tammo
Well, a helper function would not have to be 100% precize, but when adding a large array question (I needed 12 of those), there could have been some warning.

I did see the page about survey size. That I know now. Too bad. I tend to search for a manual when I think I need one, not up front. I guess I am not the only one.


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
  • tammo
  • tammo's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
7 years 10 months ago #135481 by tammo
After adding a question, the system could easily compute how many columns such a question would take? That would not be rocket science, or am I wrong?


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
7 years 10 months ago #135482 by Mazi
As said, there is no fixed limit, it depends on several variables. Thus, coding such a check is not that straightforward. We could of course show a warning when adding large array text/numbers questions but that is not sufficient, you'd have to check all other questions + sub questions as well.

Lots of users will receive wrong warnings while for others the warning may be too late...

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
  • tammo
  • tammo's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
7 years 10 months ago #135484 by tammo
Well, at least show a warning when someone adds an array or other question that will take more than 50 columns. Just to make people aware...


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
7 years 10 months ago #135485 by Mazi
That should be doable. Please file a feature request at our bug tracker.

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose