I had some issues over the weekend while upgrading AF to 4.2, and I thought I would share my issues in case anyone else runs into a similar issue.
During the upgrade, the install (a) timed out during the upgrade/install of the module the first time, and (b) didn't report an error during subsequent reinstalls. After installing, the module would take forever and throw lots of errors into the event log, complaining about a missing dbo.activeforums_SettingsTable object and about encountering <% and %> in the html.
I eventually ran the SQL scripts by hand to locate the issue, which had to do with the CREATE FUNCTION dbo.activeforums_SettingsTable call in the 04.02.00.SqlDataProvider file - it seems that my SQL Server instance did not like the usage of the PIVOT functionality. Long story short, my DNN installation dates back about 6 or 7 years ago, and it was originally installed on a SQL Server 2000 database (which doesn't support the PIVOT capability). When I upgraded from SQL Server 2000 to 2005, my hosting provider did the upgrade using backup/restore - and my database was still running in SQL Server 2000 compatibility mode.
To get the database to realize it is, in fact, SQL Server 2005, I had to run the following command:
EXEC sp_dbcmptlevel dbname, 90;
GO
This forced the database to run in SQL Server 2005 compatibility mode - at which time I was able to rerun the CREATE FUNCTION script without error. I then reran the SQL files (for good measure), and everything worked again!
Hope this helps,
Cliff