Row_Inserting error

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
eppa
User
Posts: 11

Row_Inserting error

Post by eppa »

Hi - was wondering if anyone knows a solution to my problem in the Row_Inserting server event.

I check to see if the record is ok to insert and if it is not I set the FailureMessage and return false. This is working well until I set a Master/Detail join. Now I get the following error "Compiler Error Message: CS0103: The name 'FailureMessage' does not exist in the current context". My table name is Player and the error is coming from Playermaster.cs which is being generated in a different folder than the aspxfn11.cs file. Maybe there is a way to scope to this folder also? My code is below.

public bool Row_Inserting(OrderedDictionary rsold, ref OrderedDictionary rsnew) {
// Enter your code here
// To cancel, set return value to False and error message to CancelMessage


if (!oktoinsert())
{
    FailureMessage = "Can not insert this record!";
    return false; 
}
return true;

}

Cheers.


vincenthung
User
Posts: 88

Post by vincenthung »

Please try

CancelMessage = "Can not insert this record!";


Post Reply