Sybase Technical Library - Product Manuals Home
[Search Forms] [Previous Section with Hits] [Next Section with Hits] [Clear Search] Expand Search

Chapter 6: Queue Stored Procedure Interface [Table of Contents]

Sybase dbQueue Reference Guide

[-] Appendix A: Datatypes

Appendix A

Datatypes

dbQueue 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.

Table A-1: dbQueue datatypes

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)

Datatypes in Packaged Queues

dbQueue automatically sets the definitions and ranges of datatypes for packaged queues. Sybase Adaptive Server has identical datatype definitions.

Strings

The dbQueue objects library provides the following string datatypes:

Numeric

The dbQueue objects library supplies the following numeric types:

Money

dbQueue supplies these money datatypes:

Date and Time

dbQueue supplies these datatypes for representing datetime values:

Bit Data

dbQueue supplies this datatype for representing bit data:

Text and Binary

dbQueue supplies these datatypes for representing text and binary data:

Mapping dbQueue Datatypes to DBMS Datatypes

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.

Table A-2: Datatype mapping between standards

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.

Null Values

dbQueue currently does not support null values for any datatype.

dbQueue Types for C++ and ActiveX

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."


Chapter 6: Queue Stored Procedure Interface [Table of Contents]