The create method for creating a new empty database

Sean Wilson sean at mixed-messages.co.nz
Wed Jan 28 22:04:16 CST 2009


> _global.gMerge.create(merge_db_path,#kDsc_Dat_Blb_Ind,32 * 1024)  
> 
> First, the create method returns a void, what if the database creation
> fails? Let's say the folder it is creating the new empty database to, is
> a read only, no file can be created in it, what happens then? And how do
> I catch that in the code?

You check the lastError property of the (singleton) instance of (xtra 
"Valentina")
Check the example files that are included with the installer - 
specifically 
..\V4MD_3\Examples\Common\Database_CreateCloseOpen\Database_CreateCloseOpen.dir

> Second, this might be silly but I am having a hard time figuring out how
> to correctly name the newly created database. I want to call this new
> database as 'merge_source' - how do I do that?

Your variable 'merge_db_path' above should end with the file name 
"merge_db.vdb"


More information about the Valentina mailing list