[wx-dev] R: [wx-dev] Can't read/write timestamp fields from/to a SQL Server database, please help

Jorgen Bodde solidstl at xs4all.nl
Tue Jul 4 07:12:55 PDT 2006


Hi,

The solution was just made up, as I was looking for a way to set the
wxDateTime with a long long value but there isn't any. But using
wxTimeSpan allow you to add / subtract dates so that should work.

My own solution was storing a string containing the date and time.
This is both slow and not really solid.

As for int64 numbers I would be surprised if they cannot be stored.
Using two int32 is ofcourse an option as well.

With regards,
- Jorgen

On 7/4/06, Alfonso De Prisco <adeprisco at almateq.com> wrote:
> Great! So it really seems to be a bug in the SQL Server interface code.
> Anyway, thank you very much for your advice.
>
> Just another question: are you able to write/read a 64 bits value
> (wxLongLong), or are you just splitting that value into two 32 bit ones?
> We also had troubles when trying to store 64 bit values...
>
> Alfonso
>
>
> -----Messaggio originale-----
> Da: jorgen.maillist at gmail.com [mailto:jorgen.maillist at gmail.com] Per conto
> di Jorgen Bodde
> Inviato: martedì 4 luglio 2006 14.15
> A: wx-dev at lists.wxwidgets.org
> Oggetto: Re: [wx-dev] Can't read/write timestamp fields from/to a SQL Server
> database, please help
>
> I used to parse the time from a string back to a wxDateTime. Another
> option is getting a wxTimeSpan object based upon the year 0, and upon
> retrieval from the database, construct this again as a new date. The
> wxTimeSpan returns a wxLongLong which should be accurate enough.
>
> - Jorgen
>
> On 7/4/06, Alfonso De Prisco <adeprisco at almateq.com> wrote:
> > How do I manage a timestamp (or datetime) field in a SQL Server database?
> > The timestamp type only works with MySQL but not with SQL.
> >
> > Is this a wx bug?
> >
> > Alfonso
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: wx-dev-unsubscribe at lists.wxwidgets.org
> > For additional commands, e-mail: wx-dev-help at lists.wxwidgets.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-dev-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wx-dev-help at lists.wxwidgets.org
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-dev-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wx-dev-help at lists.wxwidgets.org
>
>




More information about the wx-dev mailing list