Problem installing Lightbox Gallery V1.4.1

Nov 23, 2010 at 3:22 PM
Edited Nov 23, 2010 at 3:52 PM

I tried to install on a DNN 5.6 platform, and got this error during the adding of the extension. It seems to me that would be because when I installed DNN, I specified an object prefix - so there actually is no table called dbo.Modules - instead if is dbo.DNN_Modules

Info Start Sql execution: 01.00.00.SqlDataProvider file
Failure SQL Execution resulted in following Exceptions: System.Data.SqlClient.SqlException (0x80131904): Foreign key 'FK_DNN_wns_lightbox_moduleid' references invalid table 'dbo.Modules'. Could not create constraint. See previous errors. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) ALTER TABLE dbo.[DNN_wns_lightbox] WITH NOCHECK ADD CONSTRAINT [FK_DNN_wns_lightbox_moduleid] FOREIGN KEY ([ModuleId]) REFERENCES dbo.[Modules] ([ModuleId]) ON DELETE CASCADE NOT FOR REPLICATION
Info End Sql execution: 01.00.00.SqlDataProvider file
Jan 4, 2011 at 3:17 PM
Edited Jan 4, 2011 at 3:18 PM

You're right. Extract the ZIP-file and change line 42 of the 1.0 dataprovider (file: Providers\DataProviders\SqlDataProvider\01.00.00.SqlDataProvider) into this:

REFERENCES {databaseOwner}[{objectQualifier}Modules] ([ModuleId]) ON DELETE CASCADE NOT FOR REPLICATION

Then pack all again and everything works fine...

Jan 23, 2011 at 5:05 PM

Thanks rx, It works perfectly after changing the said line

Coordinator
Apr 6, 2011 at 5:44 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Apr 6, 2011 at 5:46 AM

The SQL script has been updated for the next and future versions to not throw this error any longer.  Sorry that I haven't back-ported this fix sooner.