Type Property

   Example   Applies To   Specifics

Sets or returns a value that indicates the operational type or data type of an object.

Settings and Return Values

The setting or return value is a constant that indicates an operational or data type. For a Field or Property object, this property is read/write until the object is appended to a collection or to another object, after which it's read-only. For a QueryDef, Recordset, or Workspace object, the property setting is read-only. For a Parameter object in a Microsoft Jet workspace the property is read-only, while in an ODBCDirect workspace the property is always read-write.

For a Field, Parameter, or Property object, the possible settings and return values are described in the following table.

Constant Description
dbBigInt Big Integer
dbBinary Binary
dbBoolean Boolean
dbByte Byte
dbChar Char
dbCurrency Currency
dbDate Date/Time
dbDecimal Decimal
dbDouble Double
dbFloat Float
dbGUID GUID
dbInteger Integer
dbLong Long
dbLongBinary Long Binary (OLE Object)
dbMemo Memo
dbNumeric Numeric
dbSingle Single
dbText Text
dbTime Time
dbTimeStamp Time Stamp
dbVarBinary VarBinary

For a QueryDef object, the possible settings and return values are shown in the following table.

Constant Query type
dbQAction Action
dbQAppend Append
dbQCompound CompounddadefCompoundQuery@jetdef35.hlp
dbQCrosstab Crosstab
dbQDDL Data-definition
dbQDelete Delete
dbQMakeTable Make-table
dbQProcedure Procedure (ODBCDirect workspaces only)
dbQSelect Select
dbQSetOperation Union
dbQSPTBulk Used with dbQSQLPassThrough to specify a query that doesn't return records (Microsoft Jet workspaces only).
dbQSQLPassThrough Pass-through (Microsoft Jet workspaces only)
dbQUpdate Update

Note To create an SQL pass-through query in a Microsoft Jet workspace, you don't need to explicitly set the Type property to dbQSQLPassThrough. The Microsoft Jet database engine automatically sets this when you create a QueryDef object and set the Connect property.

For a Recordset object, the possible settings and return values are as follows.

Constant Recordset type
dbOpenTable Table (Microsoft Jet workspaces only)
dbOpenDynamic Dynamic (ODBCDirect workspaces only)
dbOpenDynaset Dynaset
dbOpenSnapshot Snapshot
dbOpenForwardOnly Forward-only

For a Workspace object, the possible settings and return values are as follows.

Constant Workspace type
dbUseJet The Workspace is connected to the Microsoft Jet database engine.
dbUseODBC The Workspace is connected to an ODBC data source.

Remarks

When you append a new Field, Parameter, or Property object to the collection of an Index, QueryDef, Recordset, or TableDef object, an error occurs if the underlying database doesn't support the data type specified for the new object.