# open( parameter list )

> Open the SQL engine with a list of parameters.

> ### Prototype

>         void open(char const* name,
>                 mco_dictionary_h dictionary,
>                 size_t size,
>                 size_t pageSize = 128,
>                 void* mapAddress = MCO_DATABASE_DEFAULT_MAP_ADDRESS,
>                 size_t maxTransSize = 0,
>                 int flags = McoSqlOpenParameters::DEFAULT_OPEN_FLAGS,
>                 char const* databaseFile = NULL,
>                 size_t maxClasses = 100,
>                 size_t maxIndexes = 100,
>                 size_t maxDictionarySize = 16*1024);

> ### Arguments

> name | The database name
> dictionary | A handle to the dictionary that was created by the eXtremeDB schema compiler `mcocomp`. Normally, this handle is passed in by dbname_get_dictionary ()
> size | The eXtremeDB database size (in bytes)
> pageSize | The eXtremeDB in-memory page size (in bytes)
> mapAddress | The eXtremeDB map address (for a shared memory database)
> maxTransSize | The maximum number of objects per transaction
> flags | Optional open flags (see OpenFlags enum in McoSqlOpenParameters)
> databaseFile | A database file to be loaded
> maxClasses | The maximum number of classes
> maxIndexes | The maximum number of indexes
> maxDictionarySize | The maximum size of the total dictionary

> ### Description

> This method opens an eXtremeDB database, an eXtremeDB SQL mapper and the McoSqlEngine instance with the list of parameters specified.

> ### Returns

> This method throws a RuntimeException in the case of an error.

> ### Example

>         const char * dbname = "SimpleDb";

>         int main(int argc, char* argv[])
>         {
>             MCO_RET rc;
>             McoSqlEngine engine;

>             ...
>             engine.open( db_name, SimpleDb_get_dictionary(), DATABASE_SIZE, MEMORY_PAGE_SIZE);

>             ...
>         }