How do I specify an "IN" operation for AdsSetAOF in VFP? ie. result = AdsSetAOF(inHandle, "field3 IN (2,3,5,7)", locOptions) I know that typically it is not good to use the IN operator, but if it is supported in ADS SQL, it should be supported in AdsSetAOF shouldn't it? Otherwise, how would I be able to do this?

asked 15 Aug '14, 06:07

gverge393's gravatar image

gverge393
126111118
accept rate: 100%

1

I'm pretty sure that AdsSetAof() does support "$" which should work just like the IN operator on SQL. Try it as in: "FieldName $ 'SMITH'". Also, I'm pretty sure that Contains is also supported on AOFs, as in: "Contains( FieldName, 'SMITH' )"

(02 Sep '14, 08:39) Reinaldo

The AdsSetAOF call uses the Expression engine functions. Here is a page of the expressions that can be used: Advantage Expression Engine.

An IN statement is basically an easier way to specify OR. So you can set your filter to field3 = 2 or field3 = 3 or field3 = 5 or field3 = 7

link

answered 15 Aug '14, 08:59

Edgar%20Sherman's gravatar image

Edgar Sherman
5.4k13185
accept rate: 25%

Your answer to the original question.
If responding to a request for additional information, please edit the question or use the comment functionality.
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×172
×24

Asked: 15 Aug '14, 06:07

Seen: 1,435 times

Last updated: 02 Sep '14, 08:39

Advantage Developer Zone Contact Us Privacy Policy Copyright Info


Powered by Advantage Database Server and OSQA
Disclaimer: Opinions expressed here are those of the poster and do not necessarily reflect the views of the company.