Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can anyone help me out with a function that is not worki
Message
 
To
29/06/1999 20:12:16
Dovi Gilberd
Dovtware Consulting Inc
Miami, Florida, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00235321
Message ID:
00235693
Views:
22
Dovi,

I don't think the other person doesn't want to help you out. He is trying to help you to get the most out of this medium. Keep everything in one thread. That way everyone who is trying to help can follow what others are syaing and add to it for you. Breaking the thread up only causes people to suggest the same fixes because they don't see that someone else has already suggested that.

That said, on to the problem. You haven't yet told us how you decide if you want Rate1 or Rate2 or RateN. I can't suggest how to handle this without having some idea of what makes Rate1 the correct one this time and Rate2 another time.

Basically, you need to use some form of logical switch to select the field name based on the criteria. Something like;
 IF llFoundPrefix
    *  found it - save the rate we found!
    DO CASE
        CASE Rate1 is Right
           lnResult = long_distance.rate1
        CASE Rate2 is Right
           lnResult = long_distance.rate2
        CASE Rate3 is Right
           lnResult = long_distance.rate3
        CASE Rate4 is Right
           lnResult = long_distance.rate4
    ENDCASE
 ELSE
...
You are correct in your thoughts that the date is poorly designed. If you ahve any ability to change this design I would strongly recommend that do that immediately and stop trying to program around a bad data design. Over time this desing will come to bite you with some problem that cannot be programmed around. When that happens the only choice will be to redesign the data. Doiong that now will be much easier than doing it in 6 months or a year from now.
Previous
Reply
Map
View

Click here to load this message in the networking platform