When I run it with those two lines uncommented I get the following:
System.Data.SqlClient.SqlException: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_ModuleSettings_Modules". The conflict occurred in database "DNN2", table "dbo.Modules", column 'ModuleID'.
The statement has been terminated.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters)
at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters)
at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, String spName, Object[] parameterValues)
at DotNetNuke.Data.SqlDataProvider.AddModuleSetting(Int32 ModuleId, String SettingName, String SettingValue, Int32 createdByUserID)
at DotNetNuke.Entities.Modules.ModuleController.UpdateModuleSetting(Int32 ModuleId, String SettingName, String SettingValue)
at DotNetNuke.Modules.HTML.HtmlTextController.UpdateWorkflowID(Int32 ModuleID, Int32 PortalID, Int32 WorkflowID) in C:\Documents and Settings\ANH\My Documents\Projects\EPRTRsrc\DNN2\DotNetNuke_Community_05.01.00_Install\App_Code\HTML\HtmlTextController.vb:line 445
at DotNetNuke.Modules.IWebCSharp.WebService.CreatePage(String pageName, String content, String title, String lang) in c:\Documents and Settings\ANH\my documents\projects\eprtrsrc\dnn2\dotnetnuke_community_05.01.00_install\App_Code\IWebCSharp\IWebMethods\IWebMisc.cs:line 137
Its crazy. I just cant seem to get a unique module to be inserted onto the page. This is truly driving me crazy!