I receive the following error trying to add new questions to a quiz. I've tried several questions type, short answer, true/false, multiple choice, directions, etc. If I remove the checkbox to add directly to quiz, the questions are created without error. If I go to an existing quiz and try to add through the manage questions, I get the same error.
PDOException: SQLSTATE[42000]: [Microsoft][SQL Server Native Client 11.0][SQL Server]The round function requires 2 to 3 arguments. in quiz_update_max_score_properties() (line 2610 of C:\inetpub\wwwroot\drupal7\d7\sites\all\modules\quiz\quiz.module).
I'm running a WIMP stack (Windows 2008 R2, IIS 7.5, MS SQL 2008 R2, PHP 5.3)
Comments
Comment #1
rob_johnston commentedI can confirm this one... it's a difference in the SQL dialect for MS SQL Server.
See http://msdn.microsoft.com/en-us/library/ms175003.aspx for an explanation of why MSSQL needs more arguments and see http://dev.mysql.com/doc/refman/5.1/en/mathematical-functions.html#funct... for why mySql can get away with just one. Looks to me like postgreSQL can also take either one or two arguments to the ROUND function (http://www.postgresql.org/docs/9.2/static/functions-math.html).
Correct me if I'm wrong, but adding zero as the second argument should fix it for all 3 databases?
Comment #2
falcon commentedmssql problem
Comment #3
djdevin