Purpose
Creates a new database
Parameters
cName | A string up to 255 characters long that is the name of the database file that you're creating. It can be the full path and file name, such as "C:\db1.mdb". If you don't supply a file name extension, .mdb is appended. |
cDstConnect | A pointer to a string that specifies various connection information, including the collating order for text strings and a password. |
You can create a password for the new Database object by concatenating the password string (starting with ";pwd=") with a constant, for example:
dbLangSpanish & ";pwd=Password"
If you want to use the default collating order, but specify a password, simply enter a password string for this argument:
";pwd=Password"
lOptions | (Optional) A constant or combination of constants that indicates one or more options. See Settings for details |
Returns
A Database Object
Settings
You can concatenate one of the following constants in the pstrConnect argument to specify the CollatingOrder for string comparisons of text in the database.
Constant Sort order
DbLangGeneral General (English, French, German, Portuguese, Italian, and Modern Spanish)
DbLangArabic Arabic
DbLangChineseSimplified Simplified Chinese
DbLangChineseTraditional Traditional Chinese
DbLangCyrillic Russian
DbLangCzech Czech
DbLangDutch Dutch
DbLangGreek Greek
DbLangHebrew hebrew
DbLangHungarian Hungarian
DbLangIcelandic Icelandic
DbLangJapanese Japanese
DbLangKorean Korean
DbLangNeutral Neutral
DbLangNorwDan Norwegian or Danish
DbLangPDXIntl Paradox International
DbLangPDXNor Paradox Norwegian or Danish
DbLangPDXSwe Paradox Swedish or Finnish
DbLangPolish Polish
DbLangSlovenian Slovenian
DbLangSpanish Spanish
DbLangSwedFin Swedish or Finnish
DbLangThai Thai
DbLangTurkish Turkish
DbLangUndefined Undefined or unknown
You can use one or more of the following constants in the lOptions argument to specify which version the data format should have and whether or not to encrypt the database
Constant | Description |
dbEncrypt | Creates an encrypted database. |
DbVersion10 | Creates a database that uses the Microsoft Jet database engine version 1.0 file format. |
DbVersion11 | Creates a database that uses the Microsoft Jet database engine version 1.1 file format. |
DbVersion20 | Creates a database that uses the Microsoft Jet database engine version 2.0 file format. |
DbVersion30 | (Default for DAO 3.50) Creates a database that uses the Microsoft Jet database engine version 3.0 file format (compatible with version 3.5). |
DbVersion40 | (Default for DAO 3.60) Creates a database that uses the Microsoft Jet database engine version 4.0 file format (compatible with version 3.6). |
Class
DaoDbEngine The DBEngine object contains and controls all other collections and objects in the DAO object hierarchy
Example