Cant add Business Object to a form


Author
Message
Ger Cannoll
Ger Cannoll
Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)
Group: StrataFrame Users
Posts: 430, Visits: 507
Just started to set up test app.

I have created a business object, and added it to an New Project. I've also added a Maintenence Form. Am in the maintenance from and am trying to add the bsuiness object. I have 2 problems:

1. From the Miantenece Form, I click on Toolbox, but cant see a buisness object anywhere to add.

2. If I F5 to compile and run the form, it comes up with a Database Connection Wizard, defaulting to Sql Server and asking me to select a Database. I am not sure what this is for.. The buisness object I have set up is based on a VFP database.

Replies
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Gerarld,

Here are the steps to create a BO:

  1. Create a BO class based on StrataFrame BO class.
  2. Open the Business Object Mapper (BOM)
    • Map your class with your table.
    • In the BOM build the Partial Class for your BO.
    • Close the BOM.
  3. In VS IDE Build your BO project or the whole solution, then open the form and the BO classes will appear in the ToolBox.  In my case I created a Business Object Project Library named IBS_BOL, so it will show in the ToolBox as IBS_BOL Components



Edhy Rijo

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
1. From the Miantenece Form, I click on Toolbox, but cant see a buisness object anywhere to add.

They will not appear for 1 of 3 reasons.  1.) Your project that contains the assemblies has not been built. 2.) The business objects that you are trying to include are not in a project within the solution 3.) Your preferences are setup to prevent any custom control from automatically appearing within the toolbox.  You can set this by opening VS and then clicking Tools -> Options -> Windows Forms Designer -> AutoPopulateToolbox

2. If I F5 to compile and run the form, it comes up with a Database Connection Wizard, defaulting to Sql Server and asking me to select a Database. I am not sure what this is for.. The buisness object I have set up is based on a VFP database.

You need to configure your AppMain to either setup the data sources for your application manually, or if you plan to use the Connection Wizard, you will need to setup the required data source items.  By default, the template has an SQLDataSourceItem in this list...so you will need to change this.  You can look through the docs on this as well, but you will want to modify your AppMain, open the SetDataSources method, and then change the AddRequiredDataSource call to meet your needs...or you could just manually set the DataSources, but in either case, you need to setup the data sources for your application.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search