"Field" does not belong to table error.


Author
Message
Ertan Deniz
Ertan Deniz
StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)
Group: Forum Members
Posts: 163, Visits: 493
To handle this error, I've generated FieldAccessing Event for all fields.

But the code that event is fired comes after the code that column is accessed. So, I couldn't handle this condition. I'm trying to catch property access, check column if exist. If column does not exist then column will be added to the table.

Is there alternative way to accomplish tis type of requirement ? 

object loValue;

CompaniesFieldAccessingEventArgs e;

System.String loReturn;

loValue = this.CurrentRow["name"];

if (loValue == DBNull.Value)

{

loReturn = String.Empty;

}

else

{

loReturn = (System.String)loValue;

}

e = new CompaniesFieldAccessingEventArgs(CompaniesFieldNames.name, loReturn);

this.OnFieldPropertyAccessing(this, e);

return (System.String)e.ValueToReturn;


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search