Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Session.Browse syntax

Status
Not open for further replies.

GraemePr

MIS
Aug 13, 2003
1
AU
I want to find out how to use .browse.

How do I do a "not LIKE" in the filter syntax? != is for not EQUAL, but...

When .fetch is issued after a .browse (where only one record should be returned), does the engine still look through the entire table? For example, when doing a loop while .fetch, it seems to go into some sort of hang condition the second time the .fetch is done, and I can't get out of it (needs a reboot). Any ideas?
 
The .Browse syntax is fairly simple. You just have to make sure that are quotes are recognized propertly. Either as quotes defining the entire string condition or as quotes around values in the string. The symbol that I would use for 'not equal to' is '<>'. I am not sure about a 'not Like' operator.

The browse is like a filter that is used by the .fetch. From what I understand the .fetch will stop at the first record that matches the filter. Then the next and the next, etc.. This means that it will look throuth the entire table when in a loop. (do while .fetch...). If you know that you will only get one result (search for ID field) then place the .fetch in an if-else statement and it will only go as far as it needs to because you stop it after it has found the record it is looking for. The second parameter in the browse (true, or false) is suppose to determine whether yu start at the begining or end of the table (go forwards or backwards). Thus if you know the records is recently added you can start from the end of the table and it might find the record faster. However you may end up with more problems in going backwards, it's also slightly slower than going forwards.

If you are having trouble with syntax post your code and we will have a look.

Thanks and Good Luck!

zemp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top