StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



GetDataTable questionExpand / Collapse
Author
Message
Posted 07/20/2006 4:53:32 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 08/21/2008 11:49:01 AM
Posts: 303, Visits: 435
I want to do something like DataLayer.DataSources("").GetDataTable("SELECT * FROM Table") instead of going through a BO.  I just want a direct query on the database instead.  When I try to do this, the GetDataTable requires another parameter...a callback to be passed to it.  What is this parameter and what do I need to use here?
Post #1903
Posted 07/21/2006 9:18:47 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 4:17:19 AM
Posts: 4,379, Visits: 4,420
The callback method is for asynchronous access and is required based on the design of the data access layer.  You really do not need to go to the DAL to get a random query from a database.  In fact, this is not recommended since the DAL should never be touched by anything other than the business layer.  If you place code in the UI that goes directly to the DAL, you have broken encapsulation and if you attempt to create any other type of front end this will cause issues for you.

All business objects have a GetDataTable method that does what you are trying to do.  You do not have to pull data from the table that the BO represents.  Also, an ADO.NET data table is returned from the query and you can do whatever you need with that table.

Post #1910
Posted 07/21/2006 9:21:16 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 5:02:56 PM
Posts: 2,682, Visits: 1,882
The callback that is passed is the callback that should be executed for Query Notification Services if the data changes on the server... when the business object is using the SqlDataSourceItem class, you can register query notifications with the server, and the callback is the method that should be called when a notification is received back from the server. 

It's only valid for SQL Server 2005 when Query Notification Services is turned on.


www.bungie.net
Post #1912
« 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 8:09pm

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.