Hi all, have asked LOADS of time for assistance with this but got nowhere.
Have taken it on myself to try and make this work. So experimenting with SP EventsSave.
Here the SQL:
USE [dnndev]
GO
DECLARE @return_value int
EXEC @return_value = [dbo].[EventsSave]
@EventID = 2,
@ModuleID = 474,
@EventTimeBegin = N'2013-03-23 09:00:00.000',
@PortalID = 0,
@Duration = 100,
@EventName = 'Marks Test Event',
@EventDesc = 'My program tester',
@CreatedByID = True,
@Approved = False,
@Signups = False,
@RecurMasterID = 1,
@Importance = 1,
@Notify='Event Reminder: [event:title] on [NOTALLDAYEVENT][event:startdate][/NOTALLDAYEVENT][ALLDAYEVENT][event:startdate|D][/ALLDAYEVENT]',
@MaxEnrollment = 0,
@EnrollRoleID = Null,
@EnrollFee = 0.00,
@EnrollType = 'FREE',
@PayPalAccount = 'host@paypal.com',
@Cancelled = False,
@DetailPage= False,
@DetailNewWin = False,
@DetailURL = null,
@imageURL = Null,
@ImageType = Null,
@ImageWidth = 0,
@ImageHeight = 0,
@ImageDisplay = False,
@Location = Null,
@Category = Null,
@Reminder = 'You requested reminding about the following Event:<br />
<br />
[event:title]<br />
<br />
on [NOTALLDAYEVENT][event:startdate][/NOTALLDAYEVENT][ALLDAYEVENT][event:startdate|D][/ALLDAYEVENT] [event:timezone]<br />
to [NOTALLDAYEVENT][event:enddate][/NOTALLDAYEVENT][ALLDAYEVENT][event:enddate|D][/ALLDAYEVENT]<br />
[event:description]',
@SendReminder = True,
@ReminderTime = 24,
@ReminderTimeMeasurement = 'h',
@ReminderFrom = 'info@elycity.co.uk',
@SearchSubmitted = False,
@CustomField1 = Null,
@CustomField2 = Null,
@EnrollListView = False,
@DisplayEndDate = True,
@AllDayEvent = 0,
@OwnerID = 1,
@LastUpdatedID = 1,
@OriginalDateBegin = N'2013-03-23 09:00:00.000',
@NewEventEmailSent = False,
@AllowAnonEnroll = False,
@ContentItemId = 0,
@JournalItem = True,
@Summary = '',
@SaveOnly = 0
SELECT 'Return Value' = @return_value
i am getting the following error: Msg 8114, Level 16, State 1, Procedure EventsSave, Line 0
Error converting data type nvarchar to int.
Been through it with fine toothcomb and just cant see the problem, any ideas?
Oh and btw, this is the code I want to make it work in my module:
Dim ev As New Modules.Events.EventInfo
ev.EventName = "Marks Test Event"
Dim mydt As String = "23 March 2013 09:00"
ev.EventTimeBegin = "2013-03-23 09:00:00.000"
ev.PortalID = PortalId
ev.Duration = 100
ev.ModuleID = 474
ev.EventDesc = "My program tester"
ev.CreatedBy = UserId
ev.Approved = False
ev.PortalID = 0
ev.Signups = False
Dim a As New Modules.Events.EventController
a.EventsSave(ev, True)
Any assistance would be GRATEFULLY received