Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SCAN Problem
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00461246
Message ID:
00461257
Views:
14
Hi Kevin,

The simple and usual warning: don't use ALLTRIM in index expression. Instead of your idex, just use:
index on field1+field2 Tag MyTag (Why do you use IDX, BTW?)

Also why do you need two scans in your code?

What exactly do you want to achieve?


>I have the following code:
>
>SELECT 0
>USE Table2
>INDEX ON ALLTRIM(Field1) + ALLTRIM(Field2) TO MyIndex
>
>SELECT 0
>USE Table1
>SET RELATION TO ALLTRIM(Field1) + ALLTRIM(Field2) INTO Table2
>
>SCAN
>
> SCATTER MEMVAR
> IF NOT EOF("Table1")
>
> SCAN
>
> ** some code here
>
> ENDSCAN
>
> ENDIF
>
>ENDSCAN
>
>Everything seems to work fine. The tables and index are set up ok, and the
>relation is fine.
>
>Except that when I run it, all records in the the child table are being hit.
>If I browse Table2, I dont see the matching records until I browse Table1, but the data session window shows the relation. It's almost as if browsing them refreshes it somehow.
>
>What gives?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform