How to create a BO for a SQL View
 
Home My Account Forum Try It! Buy It!
About Contact Us Site Map
StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



How to create a BO for a SQL ViewExpand / Collapse
Author
Message
Posted 04/20/2008 3:49:57 PM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: 2 days ago @ 1:23:13 PM
Posts: 123, Visits: 292
I would like to create a BO for a SQL View which will be bound to an UltraGrid via a Business Binding Source. So far, I have created all my BOs and configured them through the Database Deployment Toolkit. However, it looks like I can only do this for tables and not views.

I have created a BO manually and inserted the SQL statement to query the view. However, when I add a BBS for the BO and bind it to my UltraGrid, no column information is displayed in the grid. The BO is not passing schema information to the grid at design time.

1. Is there an easier way of creating a BO for a SQL View rather than manually creating the entire BO?

2. How do I tell the BO to give the correct schema information to the UltraGrid at design time?

Thanks in advance.

Post #15781
Posted 04/20/2008 8:29:24 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 9:36:54 PM
Posts: 4,200, Visits: 4,251
Is there an easier way of creating a BO for a SQL View rather than manually creating the entire BO?

Yup...pull the schema from the SQL Server directly instead of trying to use the DDT.  The DDT does allow you to create and deploy views, but instead of totally rewriting the logic behind SQL server parsing and retrieving the columns of the view, we thought it much easier to just pull a view schema from SQL Server.  So on a BO that you intend to use as a view, choose the SQL Server option instead of the DDT (be sure to set the configuration properties for the SQL Server in the project properties), choose the view, and you are good to go.

How do I tell the BO to give the correct schema information to the UltraGrid at design time?

Well, in this case I am sure that you do not have all of your properties created like the BO mapper would, thus they don't show up.  If you map like I mentioned above the columns will show up.  But if you want to do it manually in the future for a custom property, then you will need to create a custom property, add the associated attributes, and it will appear.  There are a ton of posts and docs concerning creating a custom property.  But that would be what happened in this case.

Post #15785
Posted 04/21/2008 10:08:52 AM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: 2 days ago @ 1:23:13 PM
Posts: 123, Visits: 292
Excellent! Will give it a try later.

Thanks.

Post #15793
« 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:24am

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.109. 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.