Set attribute
Determine the properties you need to set. Determine the collection of attributes. Assign an array of DBPropset structural types, each unit being a set of identified properties. Assign an array of DBPROP structural types for each property collection. The number of units in each array is the number of attributes belonging to the set of this property set in the first step.
Jet Provider attribute
DBPropset_jetoledb_dbinit
Dbprop_jetoledb_enginetype: VT_i4 Typical R / W: R / WDESCRIPTION: JET OLEDB: Engine Type
The details of the Storage Engine (The Storage Engine) currently accessed by the currently access database / data storage is defined.
constant:
JET_ENGINETYPE_UNKNOWN = 0JET_ENGINETYPE_JET10 = 1JET_ENGINETYPE_JET11 = 2JET_ENGINETYPE_JET2X = 3JET_ENGINETYPE_JET3X = 4JET_ENGINETYPE_JET4X = 5JET_ENGINETYPE_DBASE3 = 10JET_ENGINETYPE_DBASE4 = 11JET_ENGINETYPE_DBASE5 = 12JET_ENGINETYPE_EXCEL30 = 20JET_ENGINETYPE_EXCEL40 = 21JET_ENGINETYPE_EXCEL50 = 22JET_ENGINETYPE_EXCEL80 = 23JET_ENGINETYPE_EXCEL90 = 24JET_ENGINETYPE_EXCHANGE4 = 30JET_ENGINETYPE_LOTUSWK1 = 40JET_ENGINETYPE_LOTUSWK3 = 41JET_ENGINETYPE_LOTUSWK4 = 42JET_ENGINETYPE_PARADOX3X = 50JET_ENGINETYPE_PARADOX4X = 51JET_ENGINETYPE_PARADOX5X = 52JET_ENGINETYPE_PARADOX7X = 53JET_ENGINETYPE_TEXT1X = 60JET_ENGINETYPE_HTML1X = 70
This property can be used to specify formats for new databases when calling idbDataSourceAdmin :: CreateDataSource.
Once the database is opened, this property determines the version of the file open.
Void PropertiesSet (IDBPROPERTIES * PIDBPROPERTIES) {std :: wcout << l "Propertiesset ..." << std :: endl;
DBPROP rgJetProps [1]; for (ULONG i = 0; i <1; i ) {VariantInit (& rgJetProps [i] .vValue); rgJetProps [i] .dwOptions = DBPROPOPTIONS_REQUIRED;} rgJetProps [0] .dwPropertyID = DBPROP_JETOLEDB_ENGINE; V_VT (& RGJETPROPS [0] .vvalue) = vt_i4; V_i4 (& RGJETPROPS [0] .vvalue) = jetdbenginetype_excel90;
DBPROPSET JetPropSet; JetPropSet.rgProperties = rgJetProps; JetPropSet.cProperties = 1; JetPropSet.guidPropertySet = DBPROPSET_JETOLEDB_DBINIT; pIDBProperties-> SetProperties (1, & JetPropSet);}
to be continued...