ezRETS ODBC client examples

There are a couple of people trying to use ezRETS programmatically in applications they are writing. This is opposed to doing it as an end user using Excel, Access, or another ODBC aware app.

To help with that, I’ve started a wiki page with usage examples.

Right now, I’ve got two simple PHP examples and a simple C/C++ example. I’d like to show a few more languages. If anyone would care to contribute some simple sample code in other languages, just throw it on the ezRETS mailing list or e-mail me. Also, if you are doing a piece of functionality not shown in an existing language sample, we’d be interested in that as well.

That being said, in general, I think going directly against libRETS in your programs instead of ezRETS via ODBC is the better long term direction. There are, of course, always exceptions. Also, a downside to going with libRETS right now is that libRETS is currently C++ only. We’re looking into changing that.

  1. I’m having a heck of a time getting ezRets to do what I want. Ideally, I want to
    select for a specific City, with a minimum list price and a modificationtimestamp to take the value of hours into a day.

    In sql, I’d want to do something like this:
    select * from Residential where listprice > 600000 and cityid=’AT’ and ModificationTimeStamp > ‘2009-08-03T02:00:00:00′

    When I do modification timestamp alone, it ignores the hours
    When I do a city it gives me an error “Microsoft OLE DB Provider for ODBC Drifers: Invalid Lookup Value for Lookup field: Cities Value GY:
    (My syntax was select ListPrice, CityID, NewListingID FROM data:Property:RES WHERE CityID=’GY’

  2. You should join and ask this question on the ezRETS-users mailing list. That will get you access to a host of users, many who have tackled this.

    What do you mean by “ignoring the hours” on the first one? As for the Invalid Lookup Value, it looks like that RETS server doesn’t use GY in its city lookup. If you look at the SQL Reference that ships with ezRETS on the part about working with LOOKUP values that will help you find what are the valid city codes.