Hi,

Another question - hopefully simpler.  How do I detect when a query
has failed to retrieve data?  In particular I have code like:

    cmd = schema.createCommand()
    cmd.select(schema.CANONICALS.getColumns())
    cmd.where(schema.CANONICALS.VALUE.is(value))
    row = new DBRecord(schema.CANONICALS)
    reader = new DBReader()
    reader.open(cmd, cnxn)
    ok = Schema.CANONICALS.initRecord(row, reader)

where ok is true even when there are no data (value does not exist in
the VALUE column of the CANONICALS table and "row" contains nulls)
(and similarly if I use the initRecord method on the reader).

Should ok be false above?  It appears to be true, but I must confess
that I am also using Scala (I have modified it to look like Java
above, I hope) and it is possible I am doing something stupid with
Scala...

Finally, I was originally thinking that I should subclass DBRecord and
so map rows to objects, but now I am thinking that it would be better
to use beans.  Is there any reason to prefer one approach rather than
another, or are they for different cases somehow?

Thanks,
Andrew

Reply via email to