Switch to: V12V11V10V9V8V7V6V5

Valentina Class: Database File Methods

Valentina. GetCurrentFormatVersion()

Declaration:

GetCurrentFormatVersion() as Integer

Description:

Returns the current format version of database file.

Example:

vers = Valentina.GetCurrentFormatVersion

Valentina.GetDatabaseFormatVersion()

Declaration:

GetDatabaseFormatVersion( inVdbFile as FolderItem ) as Integer

Parameters: inVdbFile Path to the database file.

Description:

Returns the version of database file format. It can work even with a closed database.

Example:

dim fi as FolderItem
dim vers as integer
 
fi = GetFolderItem( "MyDatbase.vdb" )
vers = Valentina.GetDatabaseFormatVersion( fi )

Valentina.GetDatabaseMode()

Declaration:

GetDatabaseMode( inVdbFile as FolderItem ) as Integer

Parameters:

  • inVdbFile - Path to the database file.

Description:

Returns the database mode. It can work even with a closed database.

Example:

dim fi as FolderItem
dim dbMode as integer
 
fi = GetFolderItem( "MyDatbase.vdb" )
dbMode = Valentina.GetDatabaseMode( fi )

Valentina.GetIsStructureEncrypted()

Declaration:

GetIsStructureEncrypted( inVdbFile as FolderItem ) as Boolean

Parameters:

  • inVdbFile - Path to the database file.

Description:

Returns TRUE if database structure is encrypted. It can work even with a closed database.

Example:

dim fi as FolderItem
dim isEncrypted as integer
 
fi = GetFolderItem( "MyDatbase.vdb" )
isEncrypted = Valentina.GetStructureEncrypted( fi )

Valentina.GetSchemaVersion()

Declaration:

GetSchemaVersion( inVdbFile as FolderItem ) as Integer

Parameters:

  • inVdbFile - Path to the database file.

Description:

Returns the version of database schema. It can work even with a closed database.

Example:

dim fi as FolderItem
dim SchemaVersion as integer
 
fi = GetFolderItem( "MyDatbase.vdb" )
SchemaVersion = Valentina.GetSchemaVersion( fi )

Valentina.SetExtensions()

Declaration:

SetExtensions( 
    inDesc as String, 
    inDat as String, 
    inBlb as String, 
    inInd as String)	        

Parameters:

  • inDesc - Extension for description file (.vdb)
  • inDat - Extension for data file (.dat)
  • inBlb - Extension for BLOB file (.blb)
  • inInd - Extension for indexes file (.ind)

Description:

You can call this function before opening or creating a database to inform the Valentina kernel which extensions it must use for database files. If you do not explicitly call this method, then the standard four extensions are used by default. If you do use this method, you must explicitly include all extensions that you want supported in your database application.

Note: The four standard file types of a Valentina database are explained in full in the ValentinaKernel.pdf.

The first example shows explicitly setting the standard extensions in a four file database.

The second example shows a database in which two files are created:

  • the description database file using its standard extension;
  • the index file with a custom file type of .tre instead of its standard extension, .ind.

Example:

Valentina.SetExtensions( "vdb", "dat", "blb", "ind" )
 
Valentina.SetExtensions( "vdb", "", "", "tre" )