[libRETS-users] re: Assertion Failed

Keith T. Garner kgarner at crt.realtors.org
Wed Jan 10 12:53:49 CST 2007


On Wed, 10 Jan 2007 1:24 pm, Vincent Blain wrote:
> The error is generated when I go add the 
> “ResultParse.GetColumns.Item(i).GetType” it doesn’t matter the 
> table or column.

Assuming that ResultParse is a SearchResultSet, GetColumns just returns 
a StringVector, so each item is just a String.  There is no GetType 
method on the String that is returned.  (I assume that showed up as an 
option by autocomplete?  We'll have to look into that.)  Its weird that 
you're getting a NullPointer exception instead of a method not know 
error or something similiar.  This is probably a swigism we need to look 
into.

> I was hoping that doing the above call would give me the specific 
> column datatype, listed in the MetaData below.

Nope, the GetColumns call gives you the returned columns and is 
decoupled from the metadata entirely.  We could join the two together, I 
suppose, but its worked well this way.  It doesn't require a metadata 
grab for example.

>  Right now each column is returning System.String as the datatype, 
> which in fact is the datatype of the column header not the column 
> itself.

Actually, its also the datatype of the column as returned by the 
ResultSet as well, RETS is all text based.  To keep things simple, 
everything is presented to you from libRETS as a string.

If you want to know the datatype, you need to look it the Table up in 
the Metadata and translate to a native type if you care to, many people 
do not care to.  ezRETS does this type conversion on the fly, for a 
quick example.

While we couple more closely couple the two, it wouldn't be reflective 
of RETS.  While librets does a lot to let you not care about many of the 
lower level pain of RETS, we deceided to keep the API fairly true to how 
rets actually works.  I know a few people have made their own wrapper 
for librets to do some of that coupling.

Keith

--
Keith T. Garner                   kgarner at realtors.org
Managing Director - Center for REALTOR Technology
National Association of REALTORS
(From his mobile device)


More information about the libRETS-users mailing list