Navigation:  DAO Object Classes > DaoWorkspace Class >

DaoWorkspace:CreateDatabase() Method

Previous pageReturn to chapter overviewNext page

Purpose

Creates a new database

 

Parameters

cNameA 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.
cDstConnectA 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        

dbSortGeneral        General (English, French, German, Portuguese, Italian, and Modern Spanish)        

dbSortArabic        Arabic        

dbSortChineseSimplified        Simplified Chinese        

dbSortChineseTraditional        Traditional Chinese        

dbSortCyrillic        Russian        

dbSortCzech        Czech        

dbSortDutch        Dutch        

dbSortGreek        Greek        

dbSortHebrew        hebrew        

dbSortHungarian        Hungarian        

dbSortIcelandic        Icelandic        

dbSortJapanese        Japanese        

dbSortKorean        Korean        

dbSortNeutral        Neutral        

dbSortNorwDan        Norwegian or Danish        

dbSortPDXIntl        Paradox International        

dbSortPDXNor        Paradox Norwegian or Danish        

dbSortPDXSwe        Paradox Swedish or Finnish        

dbSortPolish        Polish        

dbSortSlovenian        Slovenian        

dbSortSpanish        Spanish        

dbSortSwedFin        Swedish or Finnish        

dbSortThai        Thai        

dbSortTurkish        Turkish        

dbSortUndefined        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

ConstantDescription

 

dbEncryptCreates an encrypted database.
DbVersion10Creates a database that uses the Microsoft Jet database engine version 1.0 file format.
DbVersion11Creates a database that uses the Microsoft Jet database engine version 1.1 file format.
DbVersion20Creates a database that uses the Microsoft Jet database engine version 2.0 file format.
DbVersion30(Default) Creates a database that uses the Microsoft Jet database engine version 3.0 file format (compatible with version 3.5).

 

 

Class

DaoWorkspace        

DaoCollatingOrderEnum()

DaoDatabaseTypeEnum()