The names section of the Internet Data Query file defines nonstandard column names that can be referred to in the query. The columns refer to properties stored in the property cache, standard file system properties, or ActiveX properties that have been created in document files with IPropertyStorage, or in the Microsoft® Office summary and custom properties. The globally unique identifier (GUID) for Microsoft Office is 0xF29F85E0,0x4FF9,0x1068,0xAB9108002B27B3D9. The followin g sample defines a few of the ActiveX Summary Information properties:
[Names] #Property set for ActiveX document properties DocTitle = F29F85E0-4FF9-1068-AB91-08002B27B3D9 2 DocSubject( DBTYPE_WSTR|DBTYPE_BYREF ) = F29F85E0-4FF9-1068-AB91-08002B27B3D9 3 DocAuthor( DBTYPE_WSTR|DBTYPE_BYREF ) = F29F85E0-4FF9-1068-AB91-08002B27B3D9 4 DocEditTime( VT_FILETIME ) = F29F85E0-4FF9-1068-AB91-08002B27B3D9 0xa DocLastPrinted( VT_FILETIME ) = F29F85E0-4FF9-1068-AB91-08002B27B3D9 0xb DocPageCount( DBTYPE_I4 ) = F29F85E0-4FF9-1068-AB91-08002B27B3D9 0xe DocWordCount( DBTYPE_I4 ) = F29F85E0-4FF9-1068-AB91-08002B27B3D9 0xf SalesRegion( DBTYPE_WSTR | DBTYPE_BYREF ) = D5CDD505-2E9C-101B-9397-08002B2CF9AE "SalesRegion"
Within the section, any blank line, or a line beginning with a number sign (#
) is ignored. Other lines consist of a friendly name, optionally followed by a data type in parentheses, followed by an equal sign (=), then a GUID identifying the property set for the column, followed by either a number or a string giving the PROPID or the property name, respecti
vely. If no other data type is provided, DBTYPE_WSTR|DBTYPE_BYREF is assumed.
The friendly name is the token in query restrictions, sort specifications, and so on. Multiple friendly names can point to the same property. For example, the friendly name Author might be replaced by Auteur if an author property is to be shown to a French audience. Friendly names cannot contain spaces or special characters such as angle brackets, equal signs, exclamation points, commas, periods, and asterisks (>=<!,.*).
The GUID and PROPID/property name is the name of the property within the ActiveX property name space. See the Win32 Software Development Kit (SDK) for more information on ActiveX properties. The PROPID may be specified as a decimal (base 10) or in hexadecimal (base 16) number. In the latter case, the number must be preceded by 0x. Property names must be enclosed in quotation marks. For example, 10 is not the same as 10.
This section contains:
A data type is used to correctly interpret user input. The following table lists the OLE-DB data types supported, their equivalent Variant types, and any formatting restrictions.
OLE-DB data types | Variant type | Formatting restrictions |
---|---|---|
DBTYPE_I1 | VT_I1 | Integer. Expressed in either decimal (base 10) or hexadecimal (base 16) notation. The latter requires 0x before the number, for example, 0x3F8. |
DBTYPE_UI1 | VT_UI1 | Integer. Expressed in either decimal (base 10) or hexadecimal (base 16) notation. The latter requires 0x before the number. |
DBTYPE_I2 | VT_I2 | Integer. Expressed in either decimal (base 10) or hexadecimal (base 16) notation. The latter requires 0x before the number. |
DBTYPE_UI2 | VT_UI2 | Integer. Expressed in either decimal (base 10) or hexadecimal (base 16) notation. The latter requires 0x before the number. |
DBTYPE_I4 | VT_I4 | Integer. Expressed in either decimal (base 10) or hexadecimal (base 16) notation. The latter requires 0x before the number. |
DBTYPE_UI4 | VT_UI4 | Integer. Expressed in either decimal (base 10) or hexadecimal (base 16) notation. The latter requires 0x before the number. |
DBTYPE_I8 | VT_I8 | Integer. Expressed in either decimal (base 10) or hexadecimal (base 16) notation. The latter requires 0x before the number. |
DBTYPE_UI8 | VT_UI8 | Integer. Expressed in either decimal (base 10) or hexadecimal (base 16) notation. The latter requires 0x before the number. |
DBTYPE_R4 | VT_R4 | Real number. Can be expressed in scientific notation. |
DBTYPE_R8 | VT_R8 | Real number. Can be expressed in scientific notation. |
DBTYPE_CY | VT_CY | Currency. Expressed as two integers, separated by a period, for example, 100.55. Cannot be preceded by $, ¥, £, and so on. This data type does not specify the currency format. |
DBTYPE_DATE | VT_DATE | Date. Expressed as an absolute in two forms: yyyy/mm/dd and yyyy/mm/dd hh:mm:ss. Also expressed as a relative date: -#y, -#m, -#w, -#d, -#h, -#n, -#s where the letters correspond to year, month, week, day, hour, minute and second, respectively. Positive relative dates into the future are not supported. |
DBTYPE_BOOL | VT_BOOL | Boolean. Expressed as TRUE or FALSE. |
DBTYPE_STR | VT_LPSTR | String. Any input accepted. |
DBTYPE_WSTR | VT_LPWSTR | Unicode string. Any input accepted. |
DBTYPE_BSTR | VT_BSTR | Basic string. Any input accepted. |
DBTYPE_GUID | VT_CLSID | GUID. Expressed as xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. |
DBTYPE_BYREF | (not applicable) | For queries, this should be added to DBTYPE_STR and DBTYPE_WSTR string types. For example: DBTYPE_WSTR | DBTYPE_BYREF. |
DBTYPE_VECTOR | VT_VECTOR | Vector properties are fully supported. |
VT_FILETIME | VT_FILETIME | Expressed as an absolute in two forms: yyyy/mm/dd and yyyy/mm/dd hh:mm:ss. Also expressed as a relative date: -#y, -#m, -#w, -#d, -#h, -#n, -#s where the letters correspond to year, month, week, day, hour, minute and second, respectively. Positive relative dates into the future are not supported. |
The friendly names are always available, even if they are not explicitly defined in the names section. See List of Property Names. For example, a friendly name such as MetaDescription for the HTML meta property can be defined as
MetaDescription(DBTYPE_WSTR|DBTYPE_BYREF) = D1B5D3F0-C0B3-11CF-9A92-00A0C908DBF1 description
The following data types are for custom properties:
Microsoft Office document properties take the following GUIDs:
The following example shows you how to name a custom property for Microsoft Office by adding a GUID to the Names section of the .idq file:
Custom_Text ( DBTYPE_STR|DBTYPE_BYREF ) = D5CDD505-2E9C-101B-9397-08002B2CF9AE "Custom_Text"
In this example, Custom_Text can be any string. The value of Custom_Text does not have to be the same at the beginning and end of the line. The one at the beginning is the friendly name, and the one at the end (in quotation marks) is the Microsoft Office property name.
If defining a custom date, you must use the VT_FILETIME data type. For example:
DocDateCompleted( VT_FILETIME,20 ) = D5CDD505-2E9C-101B-9397-08002B2CF9AE "Date completed"
For other Microsoft Office properties, see the Microsoft Office Software Developers Kit (SDK). For properties available with other products, see the documentation for each independent software vendor.