[libRETS-users] Invalid Query Syntax
Kent Fehribach
kent at actiondesigns.com
Wed Dec 19 19:54:00 CST 2007
Is it because of the OR statement in the LISTSTATUS parameter with only one value? Can’t that just be (LISTSTATUS=ACT)? Have you tried isolating each of the statements with smaller queries to see which parameter is giving you the syntax error? For example LISTSTATUS and a specific MLSNUM, etc.
Kent
_____
From: librets-users-bounces at crt.realtors.org [mailto:librets-users-bounces at crt.realtors.org] On Behalf Of Bill Linker
Sent: Wednesday, December 19, 2007 6:34 PM
To: librets-users at crt.realtors.org
Subject: [libRETS-users] Invalid Query Syntax
I am trying to add in a way of excluding listings with XML parse errors…at least temporarily when waiting for the server to fix the error. It took them 5 or 6 days to fix the last error I found, so I would like to be able to just skip the bad listing(s) in the future. However, I am getting an ArgumentOutOfRangeException (C#) with the Message: “Invalid Query Syntax”.
Here is the query: “(LISTSTATUS=|ACT),(LISTPRICE=400001-470000),(MLSNUM=~1234567)”
However, based on the example given in the RETS 1.5 documentation this looks valid to me. The target server is RETS version 1.5
Any ideas on what the problem is with my query? Or an alternate solution? Thanks,
Bill
>From HYPERLINK "http://www.rets.org/files/retsproto1.5e2.pdf"http://www.rets.org/files/retsproto1.5e2.pdf (page 49 in Adobe):
7.7.3 Sub-queries
This query language provides for a nesting of sub-queries. For example:
Query=((AREA=|1,2)|(CITY=ACTON)),(LP=200000+)
Example: Query=(ST=|ACT,S OLD),
(LP=200000-350 000),
(STR=RIV ER*),
(STYLE=RA NCH),
(EXT=+WTRFRNT,D OCK),
(LDATE=2000-03- 01+),
(REM=*FORECLO SE*),
(TYPE=~CONDO,TWN HME),
(OWNER=P?LE)
Verbally, this would be interpreted as “return properties with (ST equal ACT or SOLD) and (LP between 200000 and 350000, inclusive) and (STR beginning with RIVER) and (STYLE equal RANCH) and (EXT equal WTRFRNT and DOCK) and (LDATE greater than or equal to 2000-03-01) and (REM containing FORECLOSE) and (TYPE not equal to CONDO and not equal to TWNHME) and (OWNER starting with P and having LE in the 3rd and 4th characters).”
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.503 / Virus Database: 269.17.4/1189 - Release Date: 12/18/2007 9:40 PM
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.503 / Virus Database: 269.17.4/1189 - Release Date: 12/18/2007 9:40 PM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.crt.realtors.org/pipermail/librets-users/attachments/20071219/6e205a14/attachment.html
More information about the libRETS-users
mailing list