Client side exception after inserting event

1 reply. Last post: June 17, 2013 11:55 AM by Jakub Pukovec
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Hi,

after inserting event to DB (MS-SQL) I'm getting the following exception on client side:
"Exception has been thrown by the target of an invocation.","Type":"Event","Id":,"Refresh":false})

ISRes.axd, line 13 character 618"

Looks like there is passed null value to the Id key and therefore syntax integrity is broken.

Data are properly passed to DB (no problem found in server side insert method).

After inserting new event to the DB table the progress indicator isn't removed and the mentioned client side exception occurs. Webscheduler is not updated (the new event isn't displayed until manual page refresh).

I don't have any problem when updating or deleting existing records.


Attaching the server side Insert method:

[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
public virtual int Insert(int EventID, string CategoryID, global::System.Nullable<int> ResourceID, global::System.Nullable<int> Mode, string Subject, string Description, string Location, bool AllDayEvent, global::System.Nullable<global::System.DateTime> StartTime, global::System.Nullable<global::System.DateTime> EndTime, global::System.Nullable<int> Reminder)
{
this.Connection.Open();

try
{
this.Insert(CategoryID, resID, Mode, Subject, Description, Location, AllDayEvent, StartTime, EndTime, Reminder);

SqlCommand command = new SqlCommand();
command.CommandText = "SELECT @@IDENTITY";
command.Connection = this.Connection;

return (int)command.ExecuteScalar();
}

finally
{
this.Connection.Close();
}
}

Do you have any idea what might cause the issue?

I suspect this is somehow connected to the MSSQL related solution as I don't have these problems when trying to connect to the provided MDB file via OleDB...

Thank you,

Jakub

All times are GMT -5. The time now is 1:56 PM.
Previous Next