New installation of Moodle 2.0.2 on Windows Server 2008/IIS7/MS SQL. Adding Comments block to main page generates "Database Error" immediately upon initial access to Moodle site; error page prevents normal login. Logging into admin page and hiding the Comments plugin bypasses problem.
I have traced down the source of the problem to the "limit_to_top_n()" function call from sqlsrv_native_moodle_database->get_recordset_sql(). See full trace in attached file. More specifically the reference to 'timecreated' column in
SELECT TOP 9223372036854775806 ROW_NUMBER() OVER(ORDER BY timecreated DESC) AS sqlsrvrownumber ...
needs to use the renamed column name ctimecreated renamed later in the query
c.timecreated AS ctimecreated
Is this problem unique to MS SQL Server? Does MySQL allow both a reference to either the original timecreated (non qualified) and the renamed column ctimecreated?
I have not yet attempted to decode the logic in 'limit_to_top_n'.
- duplicates
-
MDL-26458 [Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid column name 'name'
-
- Closed
-