Actual Database Field Name?

Posts   
 
    
psandler
User
Posts: 540
Joined: 22-Feb-2005
# Posted on: 07-Sep-2006 21:17:41   

All,

Is there any way to get the actual (database) field names from an entity?

Thanks,

Phil

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 08-Sep-2006 06:48:37   

SelfServicing: EntityField.SourceColumnName

Adapter: FieldPersistenceInfo.SourceColumnName use the following to get the FieldPersistenceInfo object of an EntityField2

adapter.GetFieldPersistenceInfo(IEntityField2)
psandler
User
Posts: 540
Joined: 22-Feb-2005
# Posted on: 08-Sep-2006 19:09:01   

Walaa wrote:

SelfServicing: EntityField.SourceColumnName

Adapter: FieldPersistenceInfo.SourceColumnName use the following to get the FieldPersistenceInfo object of an EntityField2

adapter.GetFieldPersistenceInfo(IEntityField2)

Hmm, I can't get this to work. GetFieldPersistenceInfo doesn't appear to be a public method on the adapter.

Edit: using version 2 + VS2005.

bclubb
User
Posts: 934
Joined: 12-Feb-2004
# Posted on: 09-Sep-2006 02:35:00   

Add a method to the dataaccessadapter class using a partial class which calls the GetFieldPersistenceInfo method and returns the value. You can then use this to retrieve the fields name in the database.