But When I 'm trying to access "id" property getting the error "specified cast is not valid".
Id property (Int32), Datatable.Column.type is System.Decimal. (ORacle table column is NUMBER").
I've run the query through FillDataTable("Select statement") command.
public System.Int32 id
{
get
return (System.Int32)this.CurrentRow["id"];
}
set
this.CurrentRow["id"] = value;
If so, then there's you're problem. When you build the business object against a database at design-time, then it's highly recommended that you execute the business object against the same database type at runtime. So, if you use the BOMapper to build the schema against the ORACLE table, then all of those Int columns will be changed to System.Decimal instead. Then, your code that accesses the business object can worry about the type conversions.