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



PrimaryKeyFields Property on a BOExpand / Collapse
Author
Message
Posted 08/09/2006 4:30:23 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
I have a BO that is based on a view.  The view has no column marked as the primary key so the BO mapper does not build the key into the designer file.  I am using this view to locate records using the BrowseDialog, becuase there is no primary key field, when the data is returned the BO currentrow is set to the first row in the datatable.  If I manually add the code to the designer file so that the BO knows what the key field of the view is, everything works fine.  Do you have an suggestions on how I can work with this situation?

Thanks

Scott

Post #2141
Posted 08/10/2006 4:06:10 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 09/26/2008 8:30:36 AM
Posts: 2,685, Visits: 1,886
You can add indexes to views, but not primary keys.  So, if you pull the view directly from SQL Server, the business object is not going to see the primary key.  The only way to get the BOMapper to see the primary key on a view is to use the Database Deployment Toolkit and create a table with the same structure as the view.  You can then define the primary key on the "faux" table and map your business object to it.  Then when you build the partial from the DDT information, you will be able to see the primary key.


www.bungie.net
Post #2149
Posted 08/10/2006 4:15:45 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
Thats kind of what I thought.  Thanks
Post #2150
« 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 12:52pm

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.125. 10 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.