Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Searching memo fields
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00306242
Message ID:
00310268
Vues:
21
>I want to set up a form to allow the user to do a search on a memo field for a complete table. Is there a way to search memo fields for specific strings.
>
>Thanks

Of course, everything depends on details--is it a case sensitive or case insensitive search, how large the table is you are searching, how consistent are the strings to be found.

If your table isn't huge, and the search is case sensitive, a SQL select like this works:

SELECT * FROM (tablename) WHERE (fieldname) LIKE "%text%"

You would be surprised how quickly this can return results.

If the words the users look for have a pattern, or can be predicted with any reliability, save your search results to a linked table saving the text the user looked for and primary keys of each record that returned. Index the table on the text. When a user does a search, look through through the saved search table first. If you don't find anything, go back to the memo field search, saving your results each time a new search is requested. If the table you are searching through is not huge, it's quicker and easier to use the sql select above. This method mimicks those used by some of internet search engines for indexing documents.
JMB Multimedia--creators of top-quality database-driven web sites and multimedia presentations.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform