Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange problem index on two strings
Message
 
À
13/06/2003 15:29:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00799975
Message ID:
00799981
Vues:
27
John,

1. I assume you have index on field1 + field2 tag myindex.

In this case the search string must contain the first pattern mystr1 having exactly the length of field1. So probably you should use :

?seek(padr(mystr1,len(mytable.field1))+mystr2,”mytable”,”myindex”)

2. Does set exact on/off affect the behaviour?




>I have an interesting problem (at least I don't understand what's wrong) I have a table indexed on two (2) string fields. Indexed on “str1+str2”. However, when I attempt to seek on the index using the two strings it returns a .f.
>
>as in seek(mystr1+mystr2,”mytable”,”myindex”) returns false.
>
>If I check the fields in the table I find they match. I'm using the program to check the fields against the strings.
>
>?table.field1 == mystr1
>?table.field2 == mystr2
>
>Both return true. Of course I place cursor on the correct record.
>
>Does anyone understand why this is not working? Is there something I don't understand about the index?????
>TIA
>
>John
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform