StrataFrame Forum

Unable to bind datatable to business object using Business Object Mapper

http://forum.strataframe.net/Topic7655.aspx

By Ben Dornis - 3/22/2007

Whenever I attempt to "Configure Business Object" the changes do not take effect. I thought it might have had something to do with the recent upgrade yet another project in the same solution has no problems what-so-ever. I'm sure it's something simple but I cannot find the solution.
By Trent L. Taylor - 3/22/2007

Are you referring to the BO Mapper?  When you make a change in the BO Mapper the changes are not be persisted back to the database? 
By Ben Dornis - 3/22/2007

Correct. Also, We get an error message when we attempt to "Rebuild" the business objects but we can't make out the message as it gets cut off. Message is as follows: "The partial class could not be built for 'table' because the business object has not..."
By StrataFrame Team - 3/22/2007

Do you have 2 business objects with the same name in different namespaces?
By Ben Dornis - 3/22/2007

No. This wasn't an issue until the upgrade as far as we are aware. One is called plain 'Business' the other is 'Import' and they both get their data from different sources.
By StrataFrame Team - 3/22/2007

Could you post a screen shot of the BOMapper's tree so we can see all of the business objects in your project?
By StrataFrame Team - 3/23/2007

OK, from the looks of the screenshot that you emailed me, the project is configured and I haven't a clue why the business objects will not let you configure them.  If you're database structure is off, meaning you're missing the x_Version columns, then you would be getting an exception and the pretty, red error window.  But, let's make sure that the updates are properly being persisted to the database by turning on debug mode.  There are 2 keys you can set, the first turns on debug mode, and the second specifies the path to the *.html file that contains the debug output

HKLM\Software\MicroFour\VSAddIns\DebugMode REG_DWORD 0 (off) or 1 (on)

HKLM\Software\MicroFour\VSAddIns\DebugFile REG_SZ [string full path to the *.html file for output]

We can then look at the output and make sure that when you configure a business object the updates are being sent to the database.

By Ben Dornis - 3/23/2007

Would you like me to post the debug here?
By Trent L. Taylor - 3/23/2007

Either that or you can just email it to Ben or myself.  You can also send a private message.  It is up to you.
By StrataFrame Team - 3/26/2007

OK, it looks like the stored procedure for the update is taking place properly.  Check your StrataFrame database and make sure that you have the DTEproject_items_Update stored procedure.  Also, when you rebuild the partial classes, are you getting errors for the business objects in the FormI9.Business.Import project, or the FormI9.Business project?  Because if you're getting errors in the Business project, then it looks to be because none of the business objects are configured.
By Ben Dornis - 3/26/2007

We recreated the solution from scratch as it was taking too long to resolve and our delivery time is looming. It now works but occasionally it still removes the mapping to the businessobject with the database. But at least it's able to resolve quickly.