Código vb.net:
Ver original
cm = New SqlCommand cm.CommandTimeout = 60 sql = "INSERT INTO PM_PARTICIPANTES_FAV (SOLICIT_FAV, ROL, PER, PROVE) VALUES (" & lSolicit_fav & ", @ROL,@PER,@PROVE)" cm.CommandText = sql cm.CommandType = CommandType.Text cm.Connection = cn cm.Parameters.Add("@ROL", SqlDbType.Int, 4, "ROL") cm.Parameters.Add("@PER", SqlDbType.VarChar, 1, "PER") cm.Parameters.Add("@PROVE", SqlDbType.VarChar, 1, "PROVE") da.InsertCommand = cm da.Update(oDs.Tables("PARTICIPANTES"))
Código txt:
Ver original
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_PM_PARTICIPANTES_FAV_PER". The conflict occurred in database "FSGS_DES_31900_9", table "dbo.PER", column 'COD'. The statement has been terminated.
¿Alguien me puede ayudar?
Gracias