[V4RB] RAM-based databases

Erik Mueller-Harder erikmh at gmail.com
Sat Jun 23 15:12:39 CDT 2007


Thanks for your reply, Ruslan.

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

Yes, that was my problem with the *example* database, as I reported on
Mantis. My question here was more general, and was not related to the
server question. (It's another puzzlement, though: why do you have
supply a project which is supposed to be a good example of how to do a
RAM-based database BY DEFAULT create the database on the server
machine instead? That doesn't seem like a good example! But anyway,
that's not the issue here.)

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

So, just to be consistent, you require that a RAM-based database be
"opened" even after you've created an instance of it, and that you
pass as its opening parameters a folderitem, the number of files you
want the database to use, and even the segment size for the files?

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

OK, that's valid then -- though I'd be interested to know why you'd
want to define different numbers of logical files in a RAM-based db.

But it just doesn't seem like Valentina's style to require me to pass
bogus parameters just for the sake of consistency.

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

OK, I've got it. And as of a few hours ago I have both the example and
my own project working fine. I just wanted to confirm that I'm really
doing this the right way.

Thanks again,

-- Erik


More information about the Valentina mailing list