QueryInformation Usage and Extension


Author
Message
Ertan Deniz
Ertan Deniz
StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)
Group: Forum Members
Posts: 163, Visits: 493
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);


Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
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

Ertan Deniz
Ertan Deniz
StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)
Group: Forum Members
Posts: 163, Visits: 493
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 ?

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