Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsEventsEventsCanCan't do an AVCalendar Import
Previous
 
Next
New Post
8/23/2006 6:12 PM
 

When I try to do an AVCalendar import, I get the following error:

Error: Import AVCalendar Events is currently unavailable.

Any ideas?

 

Thanks!

Ian

 
New Post
8/25/2006 9:53 AM
 

Now I'm getting a little more detailed error.  Hopefully, this will trigger a response from someone...

 

Error: Import AVCalendar Events is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: Cannot insert explicit value for identity column in table 'Events' when IDENTITY_INSERT is set to OFF. ---> System.Data.SqlClient.SqlException: Cannot insert explicit value for identity column in table 'Events' when IDENTITY_INSERT is set to OFF. 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.Modules.Events.Data.SqlDataProvider.EventsAVCalendarImport(Int32 CalendarModuleID, Int32 EventModuleID, String Version, Int32 TimeZoneOffset, Int32 PortalID, Boolean ImportCategory, Boolean ImportLocation) at DotNetNuke.Modules.Events.ImportAVCalendar.cmdImport_Click(Object sender, EventArgs e) --- End of inner exception stack trace ---

 
New Post
9/4/2006 12:24 PM
 
Did you ever figure out how to fix this? I'm having the same issue.
 
New Post
9/4/2006 2:22 PM
 
No, but I ended up just writing my own SQL to do it.  The "Calendar" and the "Events" tables are identical, so all you have to do it INSERT from one to the other (remember to use SET IDENTITY_INSERT <TABLE> ON).  I should have saved the script, but unfortunately I don't think I did...

Hopefully, you're a developer and this all makes sense ;)
 
New Post
9/4/2006 7:37 PM
 

Here is the script that I created based off the script that is included with the module.

ALTER PROCEDURE dbo.EventsAVCalendarImport

 @CalendarModuleID int,
 @EventModuleID int,
        @Version nvarchar(8),
 @TimeZone int,
 @PortalID int,
 @ImportCategory bit,
 @ImportLocation bit

AS
IF EXISTS(SELECT * FROM Calendar)
BEGIN

 SET IDENTITY_INSERT Events ON
   INSERT INTO Events (EventID, ModuleID, EventDateBegin, EventDateEnd, EventTimeBegin, Duration, EventName, EventDesc, Importance, RepeatType, Every, Period, Reminder, Notify, CreatedBy, CreatedDate, Approved, PortalID, Signups, MaxEnrollment, EnrollRoleID, EnrollFee, EnrollType, PayPalAccount, PayPalPassword, Cancelled, ImageURL, ImageType, ImageWidth, ImageHeight, ImageDisplay, Location, Category, TimeZoneOffset)
   SELECT EventID, @EventModuleID as ModuleID, EventDateBegin, EventDateEnd, EventTimeBegin, Duration, EventName, EventDesc, Importance, RepeatType, Every, Period, Reminder, Notify, CreatedBy, CreatedDate, Approved, PortalID, Signups, MaxEnrollment, EnrollRoleID, EnrollFee, EnrollType, PayPalAccount, PayPalPassword, Cancelled, ImageURL, ImageType, ImageWidth, ImageHeight, ImageDisplay, Location, Category, @TimeZone FROM Calendar WHERE ModuleID = @CalendarModuleID
 SET IDENTITY_INSERT Events OFF
 DBCC CHECKIDENT (Events)
END


SET IDENTITY_INSERT EventsCategory ON
if @ImportCategory <> 0
 INSERT INTO EventsCategory (PortalID, Category, CategoryName, Color)
  SELECT PortalID, Category, CategoryName, Color FROM CalendarCategory WHERE PortalID = @PortalID
 DBCC CHECKIDENT (EventsCategory)
SET IDENTITY_INSERT EventsCategory OFF

SET IDENTITY_INSERT EventsLocation ON
if @ImportLocation <> 0
 INSERT INTO EventsLocation (PortalID, Location, LocationName, MapURL)
  SELECT PortalID, Location, LocationName, MapURL FROM CalendarLocation WHERE PortalID = @PortalID
 DBCC CHECKIDENT (EventsLocation)
SET IDENTITY_INSERT EventsLocation OFF

 

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsEventsEventsCanCan't do an AVCalendar Import


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out