Subject Re: Timestamp variable with fractional seconds
Author dave@brooksnet.com
--- In firebird-support@yahoogroups.com, Olivier Mascia <om@t...> wrote:
> I will have to check (or you could step the code too to verify this)
> what is the exact SQL description returned by the engine to the client
> code for your timestamp parameter when the statement is looking like:
>
> > INSERT INTO CACHEDNS (REMOTEIP, REMOTEHOST, LASTUPDATED, ROWID)
> > VALUES (?, ?, CAST('?' AS TIMESTAMP), ?)

Sorry, I don't recall ... I stepped into 'SetValue()' with the
debugger to the point where the IBPP::Exception was thrown. The
cstring argument was not in the list of possibilities supported for
the timestamp column; I think the XSQLDA error was 'invalid type'.

> I wonder if the third '?' is described as a string or as a timestamp in
> the returned XSQLDA structure...

If I understand the question, it was timestamp. That would make sense
from the list of columns I'm inserting. The fact that I'm trying to
use a string was basically ignored; not that I'm complaining, since
the CAST would logically handle it.

Kind of like boost:;lexical_cast!

Best regards,
Dave