Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do you know if a SQL select didn't select anything?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00236234
Message ID:
00236475
Views:
13
>First, thanks to everyone who replied.
>
>Ed, your'e right about type() and the array existing first. I ended up with following (thanks to Perry for the _tally tip):
>
>if _tally = 0
> laSelCats[1] = ""
>endif
>
>which works for me. They way the code is written there is _always_ only one element in the array prior to select not finding a match.
>
>Question though. If I use laSelCats = NULL, won't that screw the reference, same as replace does?
>
>Also Barbara had mentioned problems with _TALLY and arrays. Anyone know what those problems are?

I don't have specific, repeatable examples I can give. However, we use arrays a lot in one app and I found that in several cases where the code SEEMED to be cut/paste from existing, working code that _tally simply gave the wrong answer. Since I was using local, not public variables, it might have been that intermittantly I had a pre-existing array which didn't get "zapped". We went to the type() command and had no further problems.
Barbara Paltiel, Paltiel Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform