[V4RB] RAM-based databases

Ruslan Zasukhin sunshine at public.kherson.ua
Sat Jun 23 14:50:17 CDT 2007


On 23/6/07 5:32 PM, "Erik Mueller-Harder" <erikmh at gmail.com> wrote:

Hi Erik,

> After struggling for a while with the example RAM-based database, I've
> come to the realization that the problem I've been having with my own
> attempts at a RAM-based database are probably due to the fact that
> we're required to pretend that the database is going to be a
> disk-based database.

As I have point in your Mantis report your problem with this example is
because gClient = true, i.e. Example try connect to Valentina Sever on your
computer, and you have not it.
 
> In other words, your example code calls this method:
> 
>   dim f as folderitem
> 
>   // obtain folder item for file in the same folder.
>   f = GetFolderItem("Database1.vdb")
> 
>   // We will keep db in the 4 disk files
>   mDataBase.Create( f, EVdbMode.kDsc_Dat_Blb_Ind , 32 * 1024 )
> 
> which seems absolutely non-intuitive to me for a RAM-based database.
> Folderitem? Number and distribution of disk files?

Yes FolderItem, just because be SIMIALR to disk-based db case.

RAM Database will not use this info, or at least will use NAME of file for
name of db.

Number of files for RAM db still have sense, yes in RAM can be created ONE
or FOUR logical files.

 
> I'd basically been going right from the "create instance" step to the
> "populate table" step. By the way, if anyone is getting error -39
> (with no associated error message), that's what I've been getting at
> the table.AddRecord step when omitting the above code.
> 
> I guess I'm asking for confirmation that this is really the proper way
> to go about making a RAM-based database:
> 
> - Create instance
> - Create database (pretending to give it a file name and storage mode)
> - Populate it with data
> 
> Is this really correct?

Work with RAM db differ only in constant kRamDb instead of kDiskDb


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