Issue with TIME fields.

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Sep 13 15:02:49 CDT 2006


On 9/13/06 10:36 AM, "Ruslan Zasukhin" <sunshine at public.kherson.ua> wrote:

Hi Guys,

Well, this is what we have found so far:

* the only way put into database file wrong bits is if to specify wrong date
time value:

        '03/03/2003 12:12:12:1123'

Max miliseconds value is 999.

---------
We have decide do next step:

    Ivan today will improve all str => date/time functions
    to do VERY strict checks of string on format.
    any mistake => refuse and exception.

In this way we will never allow put into db e.g. Hours == 13.
Up to know Valentina did allow this always.

 
> * You three was able produce this issue.
> 
> * you all it seems have create db on MAC.
> 
> * after this 
>     Russ have see issue in V4RB MACHO client
>     Ray it seems in ADK?
>     Chris on Windows in the moved from mac db.
> 
> * In 2 cases we have get your dbs and was able see next:
> 
>     - we pack TIME value into ULONG 4 bytes = 32 bits
> 
>     - but some last bits are not used.
> 
>     - we see that in database these bits are not ZEROED.
> 
> This results that GetString() produce correct value.
> We see it correct in viSQL, app or Vstudio.
> 
> But if this value from DB is compared as LONG == LONG to other values
> produced for search of course COMPARE fails.
> 
> 
> -------
> I have check all sources and places where we assign time values,
> I do not see how this bits can catch garbage.
> 
> So my question to you is: WHAT WAY you have to use to assign time or
> datetime value into database?
> 
> A) SQL:
> 
>     INSERT ..... VALUES ( '12:12:12' )
> 
> B) SQL + Cursor:
> 
>     curs.TimeField(1).value = '12:12:12'
> 
> Or 
> 
>     curs.TimeField(1).SetString('12:12:12')
> 
> 
> C) VTable API ?
> 

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina-beta mailing list