Server Error in '/' Application.

You cannot add or change a record because a related record is required in table 'TBL_CURSOS'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: You cannot add or change a record because a related record is required in table 'TBL_CURSOS'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[COMException (0x80040e21): You cannot add or change a record because a related record is required in table 'TBL_CURSOS'.]
   ADODB.RecordsetClass.Update(Object Fields, Object Values) +0
   WA_10450037.clVisitas.AniadirVisita() +396
   WA_10450037.Ficha.Page_Load(Object sender, EventArgs e) +227
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


Version Information: Microsoft .NET Framework Version:2.0.50727.8974; ASP.NET Version:2.0.50727.8974