StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Changing a properties name in BO mapperExpand / Collapse
Author
Message
Posted 08/29/2006 11:51:42 AM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: Forum Members
Last Login: 02/04/2008 8:43:02 AM
Posts: 176, Visits: 1,519
I am doing a conversion from our old Fox data to SQL, some of the field name in FoxPro are causing problems with the generated code for the BO mapper.  Field names like operator, or code cause the generated code to error and not compile.  Is there a way that I can 'change' the name of the field in the BO so that it will compile but still have it access the correct column in the underlaying table with out having to change all the Fox field names?

Scott

Post #2524
Posted 08/29/2006 12:11:55 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 2:14:29 PM
Posts: 4,901, Visits: 4,886
Scott,

Just copy the generated code for a field (BO.designer.cs or BO.designer.vb  and go back into the BO Mapper.  Selec the field in question and then click "Custom Code."  Paste the copied field property into the text box at the bottom.  Change the name in brackets to a different name but leave the name that is returned alone.

Example:

Public Property [ChangeThisValue] As String

This way when you rebuild your partials it will not overwrite your changes.  This way you can just change the name of the field while still referencing the old field name internally.

Post #2526
Posted 08/29/2006 12:34:22 PM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: Forum Members
Last Login: 02/04/2008 8:43:02 AM
Posts: 176, Visits: 1,519
That worked great,  Thanks Trent
Post #2530
Posted 08/29/2006 12:59:35 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 2:14:29 PM
Posts: 4,901, Visits: 4,886
Glad to hear it
Post #2532
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 5:32pm

Powered by InstantForum.NET v4.1.4 © 2009
Execution: 0.031. 7 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.