StrataFrame Forum

BrowseDialog SELECT TOP

http://forum.strataframe.net/Topic22145.aspx

By Keith Chisarik - 3/2/2009

I would like to know if there is an easy way to make the browse dialog not issue the TOP command for the select as it relates to the MaximumReturnedRecords property. I am using SQL CE with a SQLCE DataSourceItem I wrote many months ago, it has been working fine with the framework in a very simple application that has not until now needed a browse dialog. SQLCE does not yet support the TOP command and I am looking for a workaround without having to delve back into my CE datasourceitem too deep.

If the answer is yes, do this, then thanks Smile

If the answer is that I have to do this myself, where is the SQL SELECT created for the browse? Does it use the datasourceitem? I see a option to add the TOP command in BuildSelectCommand but have not investigated if that is it.... since I really dont want to if i dont have to.

SELECT TOP 100 [scans_pk], [scans_rv], [scans_scandt], [scans_scanpath], [scans_scanuser], [scans_tags] FROM scans WHERE scans_tags LIKE 'JONES%'

Thanks.

By Trent L. Taylor - 3/3/2009

Really all you would need to do is within your data source, in the BuildSelectCommand, in the QueryInfo.QueryType is SELECT_TOP, just ignore this and take another action.  That would be the only place that you would need to change this.  The BrowseDialog uses the QueryInformation class for all query requests, so it should make changing this farily simple and straight forward.
By Keith Chisarik - 3/3/2009

Awesome thanks, I was pretty sure that was it.
By Keith Chisarik - 3/3/2009

Worked great, thanks Trent.
By Trent L. Taylor - 3/3/2009

Cool Cool