Switch to: V9V8V7V6V5

VSqliteDatabase Class: Construction Methods

The VSqliteDatabase class constructor has two forms. The first one is for a LOCAL database and the second one is for a CLIENT database.

VSqliteDatabase()

Declaration:

VSqliteDatabase( inLocation as String )

Parameters:

  • inLocation - fully qualified name (path + name) for this database

Declaration:

You should use this form of VSqliteDatabase constructor, if you create a database object that will work with a local database.

Example:

db = new VDatabase( 'db1' )
db = new VDatabase( 'c:\db1' )

VSqliteDatabase()

Declaration:

VSqliteDatabase( inConnection as VConnection, inLocation as String )

Parameters:

  • inConnection - VConnection object
  • inLocation - name for this database (the path will be ignored since db is under vServer and vServer knows path to its sqlite-database folder)

Description:

You should use this form of VSqliteDatabase constructor to create a VSqliteDatabase object to access a remote database. The connection should be opened before.

Example:

connection = new VConnection( "somecompany.com", "sa", "sa" )
connection.Open()
 
remote_db = new VSqliteDatabase( connection, 'db1' )
remote_db.Open()
 
    ..................
 
remote_db.Close()
connection.Close()