![]() | ![]() |
Home |
|
|
Sybase dbQueue Reference Guide |
|
| Appendix A: Datatypes |
dbQueue messages use datatypes that correspond to SQL datetypes defined by ODBC.
Table A-1 lists the dbQueue datatypes. The "Additional Attributes" column lists required information for defining the datatype. Settings for other attributes are ignored.
dbQueue Datatype | Description | Additional Attributes |
|---|---|---|
DBQ_BINARY | Fixed length binary | length (1-255) |
DBQ_BIT | Bit data | |
DBQ_CHAR | Fixed length string | length (1-255) |
DBQ_DATETIME | Timestamp | |
DBQ_DECIMAL | Decimal number | precision (1-38), scale (0 -18, < precision) |
DBQ_FLOAT | Double precision floating point | |
DBQ_IMAGE | Long binary data | length (1 - 2,097,152) |
DBQ_INT | Signed integer | |
DBQ_MONEY | Currency | |
DBQ_NUMERIC | Decimal number | precision (1-38), scale (0 -18, < precision) |
DBQ_REAL | Single precision floating point | |
DBQ_SMALLDATETIME | Timestamp | |
DBQ_SMALLINT | Small signed integer | |
DBQ_SMALLMONEY | Small currency value | |
DBQ_TEXT | Long character data | length (1 - 2,097,152) |
DBQ_TINYINT | Tiny signed integer | |
DBQ_VARBINARY | Variable length binary | length (1 - 255) |
DBQ_VARCHAR | Variable length string | length (1 - 255) |
dbQueue automatically sets the definitions and ranges of datatypes for packaged queues. Sybase Adaptive Server has identical datatype definitions.
The dbQueue objects library provides the following string datatypes:
The dbQueue objects library supplies the following numeric types:
dbQueue supplies these money datatypes:
dbQueue supplies these datatypes for representing datetime values:
dbQueue supplies this datatype for representing bit data:
dbQueue supplies these datatypes for representing text and binary data:
Note: dbQueue guarantees messages containing data within the ranges listed can enqueue and dequeue without loss of information. In some cases, dbQueue may also accept values outside the published ranges. However, you should be aware that in these cases, dbQueue cannot guarantee the data will be uncorrupted when dequeued.
dbQueue automatically maps its own datatypes to equivalent DBMS datatypes for visibe queues. The definition and range depends on the underlying datasource.
Because messages must fit in a single row, messages stored in a database must fit within the page size.
Table A-2 lists datatype mapping between dbQueue, Adaptive Server, SQL Anywhere, and ODBC.
dbQueue dataype name | Adaptive Server datatype name | SQL Anywhere datatype name | ODBC datatype name |
|---|---|---|---|
DBQ_BINARY | binary(n) | binary(n) | SQL_BINARY |
DBQ_BIT | bit | bit | SQL_BIT |
DBQ_CHAR | char | char | SQL_CHAR |
DBQ_DATETIME | datetime | datetime | SQL_TIMESTAMP |
DBQ_DECIMAL | decimal(p,s) | decimal(p,s) | SQL_DECIMAL |
DBQ_FLOAT | float(15) | float | SQL_DOUBLE |
DBQ_IMAGE | image(n) | image(n) | SQL_LONGVARBINARY |
DBQ_INTEGER | int | int | SQL_INTEGER |
DBQ_MONEY | money | money | SQL_DECIMAL |
DBQ_NUMERIC | numeric(p,s) | numeric(p,s) | SQL_NUMERIC |
DBQ_REAL | real | real | SQL_REAL |
DBQ_SMALLDATETIME | smalldatetime | datetime | SQL_TIMESTAMP |
DBQ_SMALLINT | smallint | smallint | SQL_SMALLINT |
DBQ_SMALLMONEY | smallmoney | smallmoney | SQL_DECIMAL |
DBQ_TEXT | text | text | SQL_LONGVARCHAR |
DBQ_TINYINT | tinyint | tinyint | SQL_TINYINT |
DBQ_VARBINARY | varbinary(n) | varbinary(n) | SQL_VARBINARY |
DBQ_VARCHAR | varchar(n) | varchar(n) | SQL_VARCHAR |
In Adaptive Server, DBQ_TEXT and DBQ_IMAGE map to integer references. The image and text data are stored in separate tables.
Unlike Adaptive Server, dbQueue automatically assigns precision to DBQ_FLOAT.
dbQueue currently does not support null values for any datatype.
dbQueue datatype mapping to C++ is described in Chapter 1, "Using the dbQueue Objects Library."
dbQueue datatype mapping to ActiveX is described in Chapter 3, "Using the ActiveX Interface."
|
|