Limited Field Set Used In Business Object


Author
Message
Paul Chase
Paul Chase
Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
Clay,

I just create a method on the bo and select the fields I need.

Public Sub FillAllCustomerNames()

Me.FillDataTable("Select CustomerName,Cu_id from customer")

End Sub

This does leave the possibility that you can screw up be refencing a field that is on the bo but not contained in the uderlying datatable. This hasnt been an issue for me though.

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
Sure Wink
Clayton Hoyt
Clayton Hoyt
StrataFrame Novice (66 reputation)StrataFrame Novice (66 reputation)StrataFrame Novice (66 reputation)StrataFrame Novice (66 reputation)StrataFrame Novice (66 reputation)StrataFrame Novice (66 reputation)StrataFrame Novice (66 reputation)StrataFrame Novice (66 reputation)StrataFrame Novice (66 reputation)
Group: Forum Members
Posts: 40, Visits: 85
That was simple!

Thanks much.

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
Your select statement in your BO could retrieve whatever limited fields you want and can be accessed through the strong-typed field properties.  The only time you would receive an error is if you attempt to reference one of the strong-typed field properties that was not included in the SELECT:

SELECT my_Field1 FROM MyTable

Valid Reference from select statement above
MyBO.my_Field1

Invalid Reference from select statement above
MyBO.my_Field2 (will produce an error since the field is not in the table)

Clayton Hoyt
Clayton Hoyt
StrataFrame Novice (66 reputation)StrataFrame Novice (66 reputation)StrataFrame Novice (66 reputation)StrataFrame Novice (66 reputation)StrataFrame Novice (66 reputation)StrataFrame Novice (66 reputation)StrataFrame Novice (66 reputation)StrataFrame Novice (66 reputation)StrataFrame Novice (66 reputation)
Group: Forum Members
Posts: 40, Visits: 85
Hi Folks

I often have a use for a limited set of fields from a table (i.e., for an employee drop list, I don't need their address, phone, etc. only their ID and Name). How do you recommend doing this? In the past, I have created a function which returns a datatable but then its not strongly typed. I have also used strongly typed datasets but I would rather not use both Strataframe objects and Strongly Typed Datasets so I can keep everything consistant.

Thanks

Clay

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