Init Check Bug? Re: Sizes and checks

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Dec 28 23:23:51 CST 2005


On 12/28/05 8:21 PM, "Ed Kleban" <Ed at Kleban.com> wrote:

Hi Ed,

> The following code in 2.1 fc1 results in an alert with the following
> message:
> 
>     Database failed to initialize.  CacheSize = 6.711296e+7
> 
> So what should one test for?  Valentina.cacheSize > 0  ?
> 
> What is this strange value  6711296_ ?
> 
> 64 * 1024 * 1024 = 67108864
> 
> The database continues to work fine of course.
> 
> ============
> 
>   
>   const ValentinaCacheMB = 64
>   dim ValentinaCacheSize as Integer
>   ValentinaCacheSize = ValentinaCacheMB * 1024 * 1024
>   
>   Valentina.Init( ValentinaCacheSize, MacKey, WinKey )
>   
>   if Valentina.cacheSize <> ValentinaCacheSize then
>     alert( here, "Database failed to initialize.  CacheSize = " _
>             + str(Valentina.cacheSize) )

Actually this is wrong idea check init success in SUCH way.

Because if you ask TOO many RAM for cache, Valentina can allocate less.
So you cannot compare.


------
Strange number ... Looks to be in FLOAT way.
Hmm.  Valentina.cacheSize declared as integer ?

I think, this is RB glitch, may be you need Foramt()


-- 
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 mailing list