Below is my Code: Error throws on SubmitChanges. Please also see attached MySQL table schema.
Code: Select all
using (MyLinqDataContext dc = new MyLinqDataContext())
{
FeedUserEditor feedUserEditor = new FeedUserEditor
{
FeedId = FeedID,
UserId = UserID,
EditorLevelId = 1,
Timestamp = DateTime.Now,
IsActive = true
};
dc.FeedUserEditors.InsertOnSubmit(feedUserEditor);
dc.SubmitChanges(); //THIS IS THE PLACE IT THROWS ERROR!!!
}

Please help me out with this issue ASAP. All other tablles work perfectly fine, but this newly created table with only few fields doesn't work. In this new table I have one field which is Primary Key and is set on AUTOINCREMENT.
EDIT: I checked the dbMonitor and this is what I see..
Execute: INSERT INTO mydb.feed_user_editor (feed_id, user_id, editor_level_id, `timestamp`, is_active) VALUES (:p1, :p2, :p3, :p4, :p5)
-- -1 row(s) affected.
The very next execution where the ERROR occurs and execution Rollback's after the above is,
Execute: SELECT editor_id FROM mydb.feed_user_editor WHERE editor_id = :key1 AND feed_id = :key2 AND user_id = :key3
Awaiting your response at the earliest.
Thank you!!!!!!!!!