QueryInformation Usage and Extension
 
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 )
      



QueryInformation Usage and ExtensionExpand / Collapse
Author
Message
Posted 03/20/2008 3:37:18 AM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 2 days ago @ 10:55:30 PM
Posts: 128, Visits: 386
I'm trying to use QueryInformation Class to store some template queries.

I wonder WhereStatement class requires fields and values (these are array) but one WhereStatementTypeOptions (Equals,Greaterthan,LessThan etc). Why ?

Please explain the general process of building Where clause from WhereStatementCollection.

And I need Dbcommand object build from the QueryInformationClass ? How can I get this ?

Post #15052
Posted 03/20/2008 9:43:58 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 9:36:54 PM
Posts: 4,200, Visits: 4,251
The QueryInformation class is not really designed for use outside of our controls.  This was created for us to create queries through the BrowseDialog (and a few other places) that did not rely on a specific database language.  This is then parsed and translated at the DAL.  I do not recommend using this class as a replacement for the DbCommand....at all!  This class is not going to support many necessary features such as stored procedure calls, views, UDFs, etc.  You should use the approach that we talked about a while back on another thread about creating a base BusinessLayer class and then overriding the FillDataTable, etc. method to parse out the query and parms so that you can swap between different databases.

If you are trying to maniulate a BrowseDialog, then you would handle the Searching event and manipulate the WhereCollection.  There is a new sample of this in the 1.6.5 release in the Advanced BrowseDialog sample as well as in the help documentation: Application Framework -> UI Layer -> Controls -> Browse Dialog -> Events

Post #15061
Posted 03/25/2008 1:42:10 AM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 2 days ago @ 10:55:30 PM
Posts: 128, Visits: 386
Query Information class can be used for simple queries like implemented with BrowseDialog.

I've found the way to get Dbcommand for a QueryInformation class (For my simple queires).

SqlDataSourceItem.CreateDbCommand(query);

Post #15153
« 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:22am

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.