zoukankan      html  css  js  c++  java
  • Microsoft Access Data Types

    The following table shows the Microsoft Access data types, data types used to create tables, and ODBC SQL data types.

    Microsoft Access data type

    Data type (CREATETABLE)

    ODBC SQL data type

    BIGBINARY[1]

    LONGBINARY

    SQL_LONGVARBINARY

    BINARY

    BINARY

    SQL_BINARY

    BIT

    BIT

    SQL_BIT

    COUNTER

    COUNTER

    SQL_INTEGER

    CURRENCY

    CURRENCY

    SQL_NUMERIC

    DATE/TIME

    DATETIME

    SQL_TIMESTAMP

    GUID

    GUID

    SQL_GUID

    LONG BINARY

    LONGBINARY

    SQL_LONGVARBINARY

    LONG TEXT

    LONGTEXT

    SQL_LONGVARCHAR[2] SQL_WLONGVARCHAR[3]

    MEMO

    LONGTEXT

    SQL_LONGVARCHAR[2] SQL_WLONGVARCHAR[3]

    NUMBER (FieldSize= SINGLE)

    SINGLE

    SQL_REAL

    NUMBER (FieldSize= DOUBLE)

    DOUBLE

    SQL_DOUBLE

    NUMBER (FieldSize= BYTE)

    UNSIGNED BYTE

    SQL_TINYINT

    NUMBER (FieldSize= INTEGER)

    SHORT

    SQL_SMALLINT

    NUMBER (FieldSize= LONG INTEGER)

    LONG

    SQL_INTEGER

    NUMERIC

    NUMERIC

    SQL_NUMERIC

    OLE

    LONGBINARY

    SQL_LONGVARBINARY

    TEXT

    VARCHAR

    SQL_VARCHAR[1] SQL_WVARCHAR[2]

    VARBINARY

    VARBINARY

    SQL_VARBINARY

    [1]   Access 4.0 applications only. Maximum length of 4000 bytes. Behavior similar to LONGBINARY.

    [2]   ANSI applications only.

    [3]   Unicode and Access 4.0 applications only.

    NoteNote

    SQLGetTypeInfo returns ODBC data types. It will not return all Microsoft Access data types if more than one Microsoft Access type is mapped to the same ODBC SQL data type. All conversions in Appendix D of the ODBC Programmer's Reference are supported for the SQL data types listed in the previous table.

    The following table shows limitations on Microsoft Access data types.

    Data type

    Description

    BINARY, VARBINARY, and VARCHAR

    Creating a BINARY, VARBINARY, or VARCHAR column of zero or unspecified length actually returns a 510-byte column.

    BYTE

    Even though a Microsoft Access NUMBER field with a FieldSize equal to BYTE is unsigned, a negative number can be inserted into the field when using the Microsoft Access driver.

    CHAR, LONGVARCHAR, and VARCHAR

    A character string literal can contain any ANSI character (1-255 decimal). Use two consecutive single quotation marks ('') to represent one single quotation mark (').

    Procedures should be used to pass character data when using any special character in a character data type column.

    DATE

    Date values must be either delimited according to the ODBC canonical date format or delimited by the datetime delimiter ("#"). Otherwise, Microsoft Access will treat the value as an arithmetic expression and will not raise a warning or error.

    For example, the date "March 5, 1996" must be represented as {d '1996-03-05'} or #03/05/1996#; otherwise, if only 03/05/1993 is submitted, Microsoft Access will evaluate this as 3 divided by 5 divided by 1996. This value rounds up to the integer 0, and since the zero day maps to 1899-12-31, this is the date used.

    A pipe character (|) cannot be used in a date value, even if enclosed in back quotes.

    GUID

    Data type limited to Microsoft Access 4.0.

    NUMERIC

    Data type limited to Microsoft Access 4.0.

    More limitations on data types can be found in Data Type Limitations.

  • 相关阅读:
    国外程序员整理的 C++ 资源大全
    31部黑客电影
    向windows添加环境变量
    windows 查看动态连接库和静态连接库的方法
    十大最值得注意的MySQL变量
    源码圈 300 胖友的书单整理
    82岁“极客”老人用云计算写族谱, 90后败给“30”后!
    Redis 实现队列http://igeekbar.com/igeekbar/post/436.htm
    借助CSS Shapes实现元素滚动自动环绕iPhone X的刘海
    听说程序猿的密码大多是这样滴~看完心累中。。。
  • 原文地址:https://www.cnblogs.com/gleam/p/1764230.html
Copyright © 2011-2022 走看看