From: Warren Young
Date: June 28 2005 11:59pm
Subject: Re: field_num("pippo") = ????????
List-Archive: http://lists.mysql.com/plusplus/4571
Message-Id: <42C1E469.3070801@etr-usa.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Paoletti Vincenzo wrote:
> First,the field "pippo" doesn't exist,
> the value of result.field_num("pippo") is == result.columns() and the sys doesn't throw exception
I can make field_num throw a BadFieldName exception in this case.
But field_num() is mostly an internal-use function, so it should never
fail. Perhaps there is a better way to get the information you want
from MySQL++ that is safer. Is Row::lookup_by_name() suitable, for
instance?