returning columns from sql stored sproc not in the business object table


Author
Message
Rick Watson
Rick Watson
StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)
Group: Forum Members
Posts: 2, Visits: 13
Good morning listers,

We are currently evaluating stratraframe to use as a framework to convert our vfp application. This app has a sql server back end database. Most of our data access is using sprocs. Some of these procedures return columns across multiple tables or aggrigate columns. From the tutorials it looks like strataframe has only one table as the primary business object's data source.

How do we reference columns not in this table returned by a stored procedure?

thanks

rick
Edhy Rijo
E
StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Rick Watson (1/25/2011)
How do we reference columns not in this table returned by a stored procedure?

Hi Rick,

Welcome to the forums!!!

You can either create a View and use that as the source table for your Business Object (BO) or if the quantity of fields to be returned by your SP which are not in the primary table of the BO are not much you can create Custom Field Properties in the StrataFrame Business Object to be mapped to those columns, but the simplest way is to create a View for the BO that way the internal Data Table used by the BO will have all the fields returned by your stored procedure.

The StrataFrame Business Objects uses an internal Data Table and the Business Object Mapper (BOM) will create Custom Field Properties for each field in the real table used for the BO, so if the source table is a View then the BOM will do the work for you and create a property for each field in the view which then you can reference in your application using the business object.

Hope this help you clear your question.  Please be sure to invest some time in the documentation in the help file to get familiar with the SF terminology.

Edhy Rijo

Rick Watson
Rick Watson
StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)
Group: Forum Members
Posts: 2, Visits: 13
Good morning,

thanks for the reply.

whenever I create custom field properties on the bo, are these visible in the designers or how do they get referenced.

thanks

rick
Edhy Rijo
E
StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Rick Watson (1/25/2011)
whenever I create custom field properties on the bo, are these visible in the designers or how do they get referenced.

Yes, you need to rebuild the BO's project so you can see the Custom Field Property (CFP).  For more detail, take a look at the "Adding Custom Field Properties" topic in the help file, also there are plenty of samples in the forum on how to use these.

As anything else there are Pros and Conts on using CFP, but for the most part they will make your life easier as a developer and will help get the most out of StrataFrame. 

I also came from a VFP background and if you read some of my early posts you will see how amaze I was when figuring out how to handle something with StrataFrame.  Some of my applications handle complicated calculations and the use of the SF Business Object in comparison with VFP cursors or temporary table is just great, much easier and with total control of the data by the developer.

Edhy Rijo

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