Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Seek and LOCATE FOR not returning row
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Seek and LOCATE FOR not returning row
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Database:
MS SQL Server
Divers
Thread ID:
01658236
Message ID:
01658236
Vues:
48
I'm thinking the problem may be in using varchar and inconsistent length for the index. I probably try to change index expression to use cast to char and do the same changes in the code and see if it helps.

UPDATE. Changing index to use PADR seems to help.

------------------------------------------------------
Hi everybody,

I don't understand this problem. I can see the row is in my cursor. However, both seek and locate for are failing to find this row.

Here is what I'm trying in the command window:
LOCATE FOR templateName = 'APPAREL' AND Value_name= 'Female'
=MESSAGEBOX(value_name)
and I see result as 'LGE'

I'm attaching both structure and the data in the cursor. Can someone please explain this problem to me? I tried with SET EXACT ON and OFF - no difference :(

The actual code in the form is
*              INDEX on TemplateName + ' ' + cType + ' ' + Value_Name TAG TmplValue

					if not seek(upper(csrItems.MatrixTemplate) + ' ' + 'Row ' + alltrim(csrMatrix_Items.MatrixRowValue), 'csrTemplate','TmplValue')
					    SET STEP ON
Why is it failing?

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Répondre
Fil
Voir

Click here to load this message in the networking platform