Browse


Author
Message
Nikki Chase
Nikki Chase
StrataFrame Beginner (15 reputation)StrataFrame Beginner (15 reputation)StrataFrame Beginner (15 reputation)StrataFrame Beginner (15 reputation)StrataFrame Beginner (15 reputation)StrataFrame Beginner (15 reputation)StrataFrame Beginner (15 reputation)StrataFrame Beginner (15 reputation)StrataFrame Beginner (15 reputation)
Group: Forum Members
Posts: 13, Visits: 18
Hi all,

I am having a problem with the browse object not seeming to work properly.

It will return ALL records just fine, however I never seem to get any records returned when I try to search by any of the search fields.

For instance if I launch the browse dialog and hit Enter it returns all rows however if I try to filter by name starts with A it returns no results. Any ideas on what i mat be missing?

Thanks

Gary C Wynne
Gary C Wynne
StrataFrame Beginner (34 reputation)StrataFrame Beginner (34 reputation)StrataFrame Beginner (34 reputation)StrataFrame Beginner (34 reputation)StrataFrame Beginner (34 reputation)StrataFrame Beginner (34 reputation)StrataFrame Beginner (34 reputation)StrataFrame Beginner (34 reputation)StrataFrame Beginner (34 reputation)
Group: Forum Members
Posts: 26, Visits: 236
Hi Nikki
Gary Wynne
Gary Wynne
StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)
Group: Forum Members
Posts: 10, Visits: 40
Hi Nikki
Gary Wynne
Gary Wynne
StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)
Group: Forum Members
Posts: 10, Visits: 40
Hi Nikki

(Third Time lucky) Smile

Check that advanced options are made available and ensure that the search field is set to "Beginswith" - see the browse dialog help.

This will effectively ensure that a LIKE comparison is performed instead of an equals. If you don't, it will look for a value that is exactly equal to "A" instead of LIKE "A%".

HTH

-=Gary

Gary Wynne
Gary Wynne
StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)
Group: Forum Members
Posts: 10, Visits: 40
Hi Nikki

Ensure that the field selection is set to "Beginswith". This will ensure that the query uses a LIKE "A%" or similar as opposed to an = "A". Checkout the BrowseDialog help in the guide which makes reference to this.

HTH

-=Gary

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
Gary is correct, the first place to look is the BeginsWith that is set within the SearchFields property of the BrowseDialog control.  SQL commands are dynamically created based on the Advanced options that are active for each search field.  If no value is entered within a search field, no WHERE clause is added for the field.  So if you enter something in the field, it will use the Advanced option (even if you do not allow the end-user to change the advanced option) to build that segment of the WHERE clause. 
Nikki Chase
Nikki Chase
StrataFrame Beginner (15 reputation)StrataFrame Beginner (15 reputation)StrataFrame Beginner (15 reputation)StrataFrame Beginner (15 reputation)StrataFrame Beginner (15 reputation)StrataFrame Beginner (15 reputation)StrataFrame Beginner (15 reputation)StrataFrame Beginner (15 reputation)StrataFrame Beginner (15 reputation)
Group: Forum Members
Posts: 13, Visits: 18
I believe that is how i have it set up. Here are a few screen shots that hopefully illustrate the settings I have.


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
Actually you need to go a little deeper to get to the BeginsWith option.  Selection your SearchFields property and then clik the "..." next to it.  This will bring up an editor.  Select your search field, and then click the edit button, this will bring up the window in question Smile  It will look something like this:

Make sure that the BeginsWith is set and that it is not set to equals or something of that nature.  Hope this helps.

Nikki Chase
Nikki Chase
StrataFrame Beginner (15 reputation)StrataFrame Beginner (15 reputation)StrataFrame Beginner (15 reputation)StrataFrame Beginner (15 reputation)StrataFrame Beginner (15 reputation)StrataFrame Beginner (15 reputation)StrataFrame Beginner (15 reputation)StrataFrame Beginner (15 reputation)StrataFrame Beginner (15 reputation)
Group: Forum Members
Posts: 13, Visits: 18
That is exactly how it is set. Just to make sure here is a shot of that window. If I run the following Query in Sql Server it return the expected results.  

SELECT    *
                 FROM         customer
WHERE     (cuname LIKE 'A%')


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
You can turn on SQL debugging to see what the actual SQL statement is when executing the browse.  Why don't we do that and see what is going on behind the scenes.  To turn on SQL debugging add the following code:

AppMain.vb or program.cs

MicroFour.StrataFrame.Data.DataLayer.DataSources(0).DebugMode =
True

This will turn on the debugging and will bring up a window each time an SQL query is executed.  So be patient as you get to the browse dialog.  The window will look something like 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